Is there any way to calculate a partial derivative (for instance for the slice of a tensor) in pytorch using autograd?
Background:
I am attempting to compute the hessian of convolutional layer weights wrt the loss. However, computing the hessian for the complete tensor holding the weights for all convolution kernels is not tractable. I would therefore like to calculate the hessian for each convolution kernel, which is significantly less complex.