Skip to content
Discussion options

You must be logged in to vote

If you want a custom JVP/VJP rule with some arguments that are non-differentiable, you can use the nondiff_argnums argument to mark which ones those are. Note that this requires all arguments to be passed by position, so for functions like this with many keyword arguments you might choose to define the custom JVP/VJP on a private function, and wrap it with another function that accepts keywords.

Replies: 1 comment

Comment options

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