Per sample gradients of network's output wrt. network's input #11797
Unanswered
kopanicakova
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I would like to compute the second derivative of the network output wrt input. Unfortunatelly, the computation has to be done per sample.
Following Pytorch's tutorial (https://pytorch.org/tutorials/intermediate/per_sample_grads.html), I managed to construct some simple code:
It works, but it is super slow.
I also attempted to use vmap, but it does not seem work with adagrad.grad
Does anybody have a recommendation on how to speedup these computations?
Beta Was this translation helpful? Give feedback.
All reactions