-
Notifications
You must be signed in to change notification settings - Fork 7.1k
save_image behavior #24
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
you're right. i first did that as a hack and transferred it as-is into vision.
|
What about something similar to the Lua Torch's
(The first option can be per-instance, but I think using the min/max across all provided images makes more sense.) The difference here is that by default it's better to be able to handle all ranges instead of assuming a certain range. (I think |
Personally, I vote for having a default behavior that assumes a range [0, 1] and doesn't normalize the image. |
This is fixed in master by removing the offset, but definitely having a range parameter would be quite useful! |
https://github.com/pytorch/vision/blob/master/torchvision/utils.py#L52
The
.mul(0.5).add(0.5)
in this line seems to be assuming that the input values are in [-1,1]? Isn't the Torch convention to use [0,1] for images?The text was updated successfully, but these errors were encountered: