Skip to content
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

fix make_image #7768

Merged
merged 3 commits into from
Jul 27, 2023
Merged

fix make_image #7768

merged 3 commits into from
Jul 27, 2023

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Jul 27, 2023

I botched this in #7717 when moving from dtype=torch.float32 to dtype=None as default value. When passing dtype=None (or more likely don't pass dtype at all), without this fix we also pass None to get_max_value and get back

else:
# This is only here for completeness. This value is implicitly assumed in a lot of places so changing it is not
# easy.
return 1

This would be the right maximum value for floating point images, but since we have also switched to torch.uint8 as default dtype, we now request an integer tensor with bounds [0, 1) aka a full zero tensor.

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 27, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/7768

Note: Links to docs will display an error until the docs builds have been completed.

❌ 32 New Failures

As of commit 030d27a:

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks philip

@pmeier pmeier merged commit 8071c17 into pytorch:main Jul 27, 2023
4 of 9 checks passed
@pmeier pmeier deleted the fix-make-image branch July 27, 2023 15:39
facebook-github-bot pushed a commit that referenced this pull request Aug 25, 2023
Reviewed By: matteobettini

Differential Revision: D48642304

fbshipit-source-id: 103fba520209fd0fc81ecc839e56cdea087b7981
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants