-
Notifications
You must be signed in to change notification settings - Fork 129
Extend verify_grad to complex gradient #1367
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❌ Your patch check has failed because the patch coverage (80.00%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1367 +/- ##
=======================================
Coverage 82.05% 82.05%
=======================================
Files 203 203
Lines 48863 48875 +12
Branches 8695 8696 +1
=======================================
+ Hits 40093 40103 +10
- Misses 6619 6620 +1
- Partials 2151 2152 +1
🚀 New features to boost your workflow:
|
The link in the original issues argues very much for the non-JAX approach. Why did JAX go this way? Do the arguments they make hold for higher order auto-diff? Also want to modify one Op in this PR to show it working for complex gradients? |
I'm afraid I've raised an issue which is beyond my knowledge... I'll try to summarize what I've understood so far though. In the case of a real-valued function, jax and torch are equivalent (up to a conjugate). The internals of jax go way over my head, but the doc suggests that it computes internally the full derivative of In order to deal with higher order auto-diff I reckon we need both differentiation wrt Regarding pytensor I think if in |
Just for reference some old theano discussions on the topic: |
Description
Extend verify_grad to complex gradient following the holomorphic gradient convention (as in JAX).
The decision on which convention to follow (JAX-like or torch-like) has not been taken yet; see issue #1366.
Related Issue
Checklist
Type of change
📚 Documentation preview 📚: https://pytensor--1367.org.readthedocs.build/en/1367/