-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pullback over jacobian #1505
Comments
Yes, it is. Would not be so hard to do really. |
Are there any updates on this? The issue of non-differentiable Jacobians exists now for almost 2 years and given that "there's no major barrier to making it so, someone just has to do it", I wonder why this isn't fixed by now? I think this problem makes it very hard to favor Julia over Jax/Pytorch for more "intricate" deep learning projects. |
@flo-he solving it in the general case is non-trivial (other than making the jacobian function non-mutating, it requires reverse over reverse to be efficient). You can work around it using https://lux.csail.mit.edu/stable/manual/nested_autodiff which makes certain assumptions on how Zygote.jacobian is being called |
I see, thank you @avik-pal! |
I get a mutation error when I try to do the following:
I have a parameterized function that takes a set of inputs. I would like to take the jacobian of this function (really just the diagonal) with respect to its inputs and then perform gradients on the resulting object with respect to the parameters.
Not long ago I posted about this in a semi-related issue, but my example code at the time involved neural networks. I'm posting here now with an MWE that I think does indeed belong in a Zygote issue.
The stacktrace
Version info
The text was updated successfully, but these errors were encountered: