-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Add on_after_backwards callback option #3657
Comments
useful! |
We nearly need the same feature: Currently we are using the same alternative (in the |
maybe we should add all the optimizer-related hooks to callbacks too if it makes sense. |
@rohitgr7 which hooks do you have in mind? |
@awaelchli all of them? |
I think that would be nice to have. |
okay, will add them. |
🚀 Feature
Add an on_after_backward callback option.
Motivation
Currently there are no callbacks for after the backwards step so non-essential code like logging gradients clutters the LightningModule.
Pitch
Expand the callback options to include a hook for
on_after_backward()
to execute callbacks immediately after the backwards passAlternatives
Sticking my non-essential gradient logging code in my LightningModule
The text was updated successfully, but these errors were encountered: