-
Notifications
You must be signed in to change notification settings - Fork 912
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
Define ufunc JO and JTO simultaneously #312
Open
j-towns
wants to merge
39
commits into
HIPS:master
Choose a base branch
from
j-towns:fwd-rev-in-one-def
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
7b18fe4
Start implementing def_ufunc_derivs
j-towns 91e510e
Refactor def_ufunc_derivs
j-towns 89cf08c
More ufuncs to new format
j-towns 94747f5
Unary ufuncs new style
j-towns 0e18a7e
Use broadcast_to not broadcast, also refactor unbroadcast.
j-towns b753db7
Ensure that deriv is evaluated during fwd pass
j-towns 9015f0f
Merge branch 'dev-1.2' into fwd-rev-in-one-def
j-towns 5104a90
Re-add accidentally deleted imports
j-towns b1e5e54
Re-add subval import
j-towns cd5662b
Rm unnecessary brackets
j-towns 760618e
Merge branch 'dev-1.2' into fwd-rev-in-one-def
j-towns b41a84b
Merge branch 'fwd-rev-onedef-reducs' into fwd-rev-in-one-def
j-towns d305a45
Refactor - new numpy.util module for def_ufunc_jps
j-towns a86d0b6
Rename binary->nary ufunc jps
j-towns 21ac8c8
stats.norm jps to new format
j-towns 62c3e54
Add possibility for None jp to nary ufuncs
j-towns 585f3cb
stats.t jps to new format (and psi, polygamma)
j-towns a29c770
Scipy special to new format
j-towns e4c719d
simplify logcdf grads
j-towns fad42ef
Merge branch 'master' into fwd-rev-in-one-def
j-towns 57df4d8
Re-add missing scipy tests
j-towns 8205a3d
hypot grad to new format
j-towns d2c737a
New scipy ufuncs to new format
j-towns 1ba7015
Simplify def_ufunc_jps api
j-towns 394e28b
Refactor def_ufunc_jps
j-towns 9a00147
Merge branch 'master' into fwd-rev-in-one-def
j-towns 486ecea
Add docstring to def_ufunc_jps
j-towns 27e882b
New stats grads to new format
j-towns 204baea
Add inverse pair helper
j-towns 98bedda
Beta fns to new ufunc jp format
j-towns b1852af
Add tanh and 'add' benchmarks
j-towns cd5d24f
rm unnecessary match_complex from ufunc vjps
j-towns f6dfd73
fix numpy vjp benchmarks
j-towns 70e0bd0
Merge branch 'master' into fwd-rev-in-one-def
j-towns 087880b
Merge branch 'master' into fwd-rev-in-one-def
j-towns b5fa236
Fix arctan2 jps def
j-towns 57eb1b4
Rm unused imports
j-towns 93e5601
fix indentation numpy_wrapper.py
j-towns a9c0e45
Define derivs for scipy.special.rel_entr
j-towns File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
For the vjps I've used this slightly weird
d=deriv(ans, *args)
default argument syntax to ensure thatderiv
is evaluated during the forward pass, allowing*args
andans
to potentially be garbage collected.Any objections? I could also have done this using a kind of helper closure to evaluate deriv, which would have been a bit more explicit.