Hi,
Thanks for the colab link!
Running with a brand new env there, I get the proper result for each cell though. Can you try again on your side?
Also image.cuda() does nothing! You can remove this line and it will have the exact same behavior. (.cuda() cannot be done inplace).