Solved by KFrank in post #2 
              
              
                Hi Blu! 

The seemingly innocuous image = image * 1.0 creates a new 
image (that is then assigned to the python reference variable image) 
that, being the result of a tensor computation, is no longer a leaf 
variable. 
Consider: 
>>> import torch
>>> torch.__version__
'1.9.0'
>>> image = torch.zeros…