Hi there,
I’d like to compute the gradient wrt inputs for several layers inside a network. So far, I’ve built several intermediate models to compute the gradients of the network output wrt input using autograd.grad.
Can it be done more efficiently using hooks?
Thanks.