Skip to content

Explanation for weird pytree behaviour with grad? #1255

Answered by jheek
aniquetahir asked this question in Q&A
Discussion options

You must be logged in to vote

jax.grad returns the gradient wrt to inputs while jit simply compiles a function and returns its output. Here the argument is a Test while the output is a scalar so that explains why the types are different.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by marcvanzee
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