where to add weight decay scheduler #13592
Answered
by
akihironitta
FredZZD
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
-
I want to change weight decay during training, which hook should I overwrite, optimizer_step(), on_train_batch_end() or ... ? |
Beta Was this translation helpful? Give feedback.
Answered by
akihironitta
Jul 11, 2022
Replies: 1 comment 1 reply
-
@FredMushZhao I think either works if you want to schedule it on each step. Alternatively, you could use For reference on all available hooks: https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_module.html#hooks |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
FredZZD
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@FredMushZhao I think either works if you want to schedule it on each step. Alternatively, you could use
on_train_epoch_start
if you want to update it on each epoch.For reference on all available hooks: https://pytorch-lightning.readthedocs.io/en/stable/common/lightning_module.html#hooks