Skip to content
Discussion options

You must be logged in to vote

Can you say more about what you're trying to accomplish when you were attempting to bind a primitive with a raw ad.Zero object?

I have my own primitive and I'm trying to make jvp and vjp work with it. Now I think I understand the intended way to do so. I am supposed to "intercept" ad.Zero when defining the jvp and also, if the jvp involves custom primitives, I need to make sure their transposition rule also handles ad.Zero objects. Basically, I need to write an implementation of jvp and transpose for every possible combination of ad.Zero on the input arguments. This is what I was doing wrong. I was using the arguments directly, which resulted in binding primitives with non valid jax types.

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by cgel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants