Solved by justusschock in post #3 
              
              
                requires_grad is always False for the data attribute. This is a legacy attribute for performing operations without getting them tracked by autograd. You should not use .data. The recommended ways to achieve the same are ẁith torch.no_grad(): or .detach(). 
Have a look at the following example: 
In[1…