back-propagating Gramians #157
Closed
PierreQuinton
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We need to explore the possibility of traversing the PyTorch graph to be able to backpropagate Gramians. Here is a code that implements a simplified version of
backward
(no freeing of the graph and such):with example:
Here is some code that sometimes work for backpropagating the Gramian:
Observe that we had to wait until the Jacobian is fully backpropagated to compute the Gramian, indeed if the tensor is
a+a
, then we have to wait until the full Jacobian of the output wrt toa
is computed, since the Gramian of the Jacobian is not a linear operator.I think that this makes such a low level implementation useless since we want to consider only sequential of models that have different parameters. Maybe I can find a nice theoretical idea on how to workaround this non linearity still.
Also related:
Beta Was this translation helpful? Give feedback.
All reactions