Solved by albanD in post #2 
              
              
                Hi, 
require_grad is not a pytorch thing  So it has no effect. 
Note that you can set any attribute you want on Tensor, this is why you didn’t see any error (param.foo = 3 would work as well).