-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code inside function with rrule should not run #57
Comments
My hypothesis (without checking it in detail) is that the problem is that the backend for ChainRulesCore integration (used also for Zygote in your example) uses the
value_and_pullback_function (
derivative (
jacobian (
I think one "just" has to define |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MWE:
The code inside of myfunc should never run. In addition to possible inefficiency, this may lead to incorrect/confusing results for stateful functions or stochastic functions.
The text was updated successfully, but these errors were encountered: