Solved by KFrank in post #2 
              
              
                Hello Ömer! 

Just as you use pytorch’s autograd to calculate the derivatives (gradient) 
of your loss function with respect to your model’s parameters (and then 
use those to update your model with gradient descent), you can use 
autograd to calculate the derivatives of a prediction for a single cl…