Solved by ptrblck in post #2 
              
              
                Yes, that is correct. You would get an error, if a method is not differentiable. As a quick test, you could call the backward() method and check all parameters for valid gradients via:

for name, param in model.named_parameters():
    print(name, param.grad)

If any parameter returns a None gradien…