Skip to content

Jax conversion of custom jvps and vjps (and choice of forward or backward mode diff). #18320

Discussion options

You must be logged in to vote

jax.grad and jax.value_and_grad always use reverse-mode AD. Forward-mode AD is exposed as jax.jacfwd and jax.jvp.

(See e.g. here: grad doesn't work if VJP / reverse-mode isn't defined on a primitive.)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LawrenceMMStewart
Comment options

Answer selected by LawrenceMMStewart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants