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
Yes, img.permute((2, 0, 1)) returns non-contiguous tensor and avoids data copy. Here is a discussion on why keeping channels last memory format here: #2092 (comment)
Uh oh!
There was an error while loading. Please reload this page.
🐛 Bug
torchvision.transforms.functional.pil_to_tensor
returns non-contiguous tensorTo Reproduce
Expected behavior
.contiguous()
is recommended to be used after.permute()
, so thatto_tensor()
;cc @vfdev-5
The text was updated successfully, but these errors were encountered: