-
Notifications
You must be signed in to change notification settings - Fork 63
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
make_zero! for immutable #1958
base: main
Are you sure you want to change the base?
make_zero! for immutable #1958
Conversation
Hi, just want to mention that I've spent a lot of time with make_zero! lately for #1852, which is almost ready. There are several bugs (missing branches in some You can check out this commit on a branch in my fork for fixes to all the bugs I found in |
If
in the generic handler will fail. |
That's only the case if the immutable contains immutable differentiable values, like I.e., the test case added in this PR would never hit the However, if you have a MixedState NamedTuple contained within a mutable container, such as Is this what you've been running into? |
Just realized the proposed fix here could also be a way to mask #1935 (because the bug in |
Recurse through the immutable and set the mutable fields to zero.