-
Is there an equivalent to value_and_grad but for non-scalar outout? Like jacrev and grad? jax.vjp does not do it because for you have to call more than one time in case the output of a function is a tuple to get the result as a jacrev |
Beta Was this translation helpful? Give feedback.
Answered by
jakevdp
Jan 27, 2025
Replies: 1 comment 1 reply
-
Hi - thanks for the request! This was discussed way back in issue #762: basically, there's not much to gain from providing such an API vs. just evaluating the function and its jacobian separately. But if you really want to do them together, you can use the short recipe at #762 (comment). |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ASKabalan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi - thanks for the request! This was discussed way back in issue #762: basically, there's not much to gain from providing such an API vs. just evaluating the function and its jacobian separately. But if you really want to do them together, you can use the short recipe at #762 (comment).