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 support for forward mode differentiation #165

Open
CosmoMatt opened this issue Mar 14, 2023 · 1 comment
Open

Add support for forward mode differentiation #165

CosmoMatt opened this issue Mar 14, 2023 · 1 comment

Comments

@CosmoMatt
Copy link
Collaborator

Currently the custom VJP implementation is restricting the code to reverse mode differentiation. Though this is by far the more common of the two modes, we should add support for forward mode auto-diff, though it is not entirely clear how.

@ASKabalan
Copy link
Collaborator

Hello,

You should consider using a custom_jvp instead, though does not seem very common .

You can get the forward mode derivative's value with a reverse mode differentiation for free.
The only reason to implement a jvp is when you only want the forward grad and you have a strict performance constraint and you don't want to waste performance on the backward pass

You might be interested in this explaination

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

No branches or pull requests

2 participants