-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Allow torchvision.io to pass through ToTensor() #2959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@jgbradley1 |
A long time ago, someone decided that So do you let Since most of the transforms accept |
Perhaps I'm just way off-base with this line of thinking. I'm okay if the decision is people should read the documentation and make necessary changes to use |
Hi, Thanks for sparkling this discussion. Even though the current default is to rely on My current thinking is to move users away from If we were to change Thoughts? |
I like the suggestion to add a warning. While this request is not really a technical bug, it would help the community evolve and push everyone in the right direction away from using Just summarizing what this request involves then.
|
@jgbradley1 I think I would be fine with what you propose, but let's hear what @vfdev-5 and @datumbox think as well. |
I'm on the fence on this one. On one hand, the proposal looks good and seeks to extend an existing functionality that could be useful to the users. On the other hand, implementing the improvement might reinforce using this problematic function. Since we are actively talking about moving users off the specific method, is it worth considering just adding a warning on the existing code and avoid adding any further extensions? My concern stems from the fact that standardization/preprocessing is an important part of training/inference that should be handled explicitly by the user. This is particularly true in transfer learning where if you mess this up you can get really poor results. I suspect that with the current setup, many users might be calling the |
I also think passing uint8 tensor into |
Ok, I'm convinced with @datumbox and @vfdev-5 comments, so I think in order to get users to try this out we should instead replace examples / tutorials with the new code. As such, I'll be closing this issue, but thanks again for the discussion and let us know if you have any more thoughts / comments. |
🚀 Ensure torchvision.io is a drop-in replacement with current workflows
The following snippet will fail.
Pitch
Consider making native io compatible with existing transform workflows by allowing the tensor type to pass through
ToTensor()
. This would still scale down tensor values to the range 0-1 and not impact downstream transformations.The text was updated successfully, but these errors were encountered: