Skip to content
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 make_jvp and make_ggnvp convenience wrappers #237

Merged
merged 1 commit into from Jun 8, 2017
Merged

Conversation

mattjj
Copy link
Contributor

@mattjj mattjj commented Jun 8, 2017

This PR adds the make_jvp and make_ggnvp convenience wrappers we developed in the thread for #175, plus tests. (It also adjusts the names inside make_vjp to be more consistent with vjp usage elsewhere.)

There are some wasted FLOPs in these implementations where we propagate zero vectors through vjp's just to trace them; I think we could get rid of these wasteful computations by adding a new function to core.py that essentially transposes the matrix-free linear map represented by calling backward_pass on a trace. However, there would still be graph munging overhead compared to a proper forward-mode implementation.

Also change the names inside make_vjp to be more consistent with vjp usage
elsewhere.
@mattjj
Copy link
Contributor Author

mattjj commented Jun 8, 2017

@j-towns developed a lot of the code here in #175, and thanks to @jekbradbury for discussion on this!

@mattjj mattjj merged commit a055b42 into master Jun 8, 2017
@mattjj mattjj deleted the add-jvp-and-ggnvp branch June 8, 2017 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant