That was an example of the partial derivative of 1D vector h with respect to 1D vector x, I supposed ‘h’ and ‘x’ are both 1D, but in my problem they are 2D. So shall I use ‘jacobian’? there is a problem with it https://pytorch.org/docs/stable/autograd.html?highlight=jacobian#torch.autograd.functional.jacobian 2
how can I pass x and h to this function? remember that I want compute the jacobian of h which is a FC layer with respect to its input which is the output of ReLU activation function.
whould you please give me a piece of advice.
thanks in advance