You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function that creates the resampling grid will use the default tensor dtype. If this is bfloat16/float16 and the image is sufficiently large (over 250x250 px), this results in significant quantizing that seems undesirable. The output will look extremely subsampled from the original. This would not occur if the dtype was higher precision.
My suggestion would be to update these linspace to either be dtype=theta.dtype or explicitly dtype=torch.float32 to prevent this from happening.
Versions
Current
The text was updated successfully, but these errors were encountered:
Thanks for the report @danielgordon10 . This area of the transforms isn't actively developed / maintained anymore. We are now supporting the torchvision.transforms.v2 namespace. Can you please clarify whether you're observing the same issue with the utilities in v2? Also, can you please provide a minimal reproducing example, to give us an idea of which public APIs are impacted? Thank you
🐛 Describe the bug
vision/torchvision/transforms/_functional_tensor.py
Line 594 in f799a53
This function that creates the resampling grid will use the default tensor dtype. If this is bfloat16/float16 and the image is sufficiently large (over 250x250 px), this results in significant quantizing that seems undesirable. The output will look extremely subsampled from the original. This would not occur if the dtype was higher precision.
My suggestion would be to update these linspace to either be
dtype=theta.dtype
or explicitlydtype=torch.float32
to prevent this from happening.Versions
Current
The text was updated successfully, but these errors were encountered: