ptrblck:

img = img.permute(1, 2, 0


Thanks! That fixed it, do you know why view didn’t work? Edited: A quick loop shows permute works for some images but not on all of them?
Edited: Nvm there was left over old code. Thanks for the solution!