-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add helper to build hessian vector product #858
Conversation
45ac43c
to
a7cb96e
Compare
a7cb96e
to
1f9f892
Compare
1f9f892
to
2c87765
Compare
432c14d
to
f6877ef
Compare
f6877ef
to
7c15b46
Compare
673f70f
to
93a768d
Compare
Failing tests are probably due to changes in new scipy that was released 2 days ago |
43a77a6
to
3d3f3be
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #858 +/- ##
=======================================
Coverage 81.20% 81.20%
=======================================
Files 170 170
Lines 46992 47001 +9
Branches 11510 11512 +2
=======================================
+ Hits 38160 38169 +9
Misses 6621 6621
Partials 2211 2211
|
3d3f3be
to
c86763f
Compare
856a92b
to
b5bf4fe
Compare
Co-authored-by: Adrian Seyboldt <[email protected]>
b5bf4fe
to
ce484de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there is any reason to require wrt and p to be 1d. As long as wrt and p have the same shape(s) everything should be fine.
Maybe we can add a test for that and remove the "1-dimensional" from the docs?
Otherwise this look good.
Sorry @aseyboldt I missed your comment before pressing the green button! Opening an issue |
Description
This can be quite useful for optimization, and it's perhaps not trivial for users how to build the expression (it surely wasn't for me)
Actually this was described in the docs, I still think a helper may be easier / more discoverable: https://pytensor.readthedocs.io/en/latest/tutorial/gradients.html#hessian-times-a-vector