Hello! I want to calculate the derivatives (actually Jacobian) of a NN with respect to its input. Usually I do something like this:
torch.autograd.grad(y, x, create_graph=True)
But in this case x doesn’t have the “require grad” property (it is the input to the network so it should be fixed). How can I calculate the derivative in this case? Thank you!