Solved by albanD in post #2 
              
              
                Hi, 
It is because .to() is a differentiable op. And so the data that you get back is not a leaf anymore (if you print it, you’ll see the grad_fn attached to it).