Solved by jpeg729 in post #2 
              
              
                volatile=True tells PyTorch to not bother keeping track of the computation graph. 
If any of your inputs have volatile=True then you will very likely find that calling .backward() will result in an error.