feature request: Specifying non-differentiable outputs in custom_vjp
See original GitHub issueCurrently the custom_vjp interface allows one to specify input arguments that should not be differentiated via the nondiff_argnums
argument.
It would be useful to have an equivalent option for a function with multiple return values, allowing the user to specify which output arguments should not be differentiable. Perhaps it could be named nondiff_outputs
?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Custom derivative rules for JAX-transformable Python functions
As a mathematical function on R (the full real line), f is not differentiable at zero (because the limit defining the derivative doesn't...
Read more >Cloud Feature Requests | CircleCI Ideas - Canny
The request is to have a way to rerun a job with SSH such that anyone with access to the repo can have...
Read more >Help forum and feature requests - Looker Studio Help
Request a feature Vote and comment on requested features to help the Looker Studio team prioritize what to build. Request new features using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry for the late reply, and thank you for this. I’ve verified that it works as intended.
Something along these lines:
If you had nothing differentiable in
Foo
you can just return an empty tuple as the first output offlatten()
and ignore the second arg ofunflatten()
.