Open
Description
🚀 Feature
A callback hook for on_after_optimizer_step
.
Motivation
There's a callback hook for on_before_optimizer_step
, but not for on_after_optimizer_step
.
That would be useful for implementing an ExponentialMovingAverage callback: I'd like to update the average weights after the optimizer has updated the parameters. Doing this average weight update with on_train_batch_end
hook will not be accurate, as the model weights may not get updated after every training batch (due to gradient accumulation).
cc @Borda @tchaton @rohitgr7 @carmocca @awaelchli @ninginthecloud @daniellepintz