Solved by albanD in post #2 
              
              
                Hi, 
This warning only means that you are accessing the .grad field of a Tensor for which pytorch will never populate the .grad field. 
You can run your code with python -W error your_script.py to make python error out when the warning happens and so show you where it happens exactly. 
The gist of t…