Jax jacfwd() vs numeric graident #22057
Unanswered
RaviPandey33
asked this question in
Q&A
Replies: 1 comment
-
It's hard to say for sure without knowing the inputs you're using, or how you're computing the numerical gradient. But if I had to guess, I suspect some of your input values are near the discontinuity at zero, and your numerical integration offsets are straddling that discontinuity. If that's the case, then the analytic gradient is certainly more accurate. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to find gradient for this

Both the methods , jacfwd() and numeric gradient gives me different answers. Could anyone tell me the reason ?
Is it because of the use of jnp.abs() value ?
which one should i consider correct ?
Beta Was this translation helpful? Give feedback.
All reactions