Does SWA option reset scheduler's state? #9444
Unanswered
dazzle-me
asked this question in
Lightning Trainer API: Trainer, LightningModule, LightningDataModule
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Situation :
I tried to use
stochastic_weight_avg=True
in my training but faced unexpected behavior of the scheduler - it gives different LR-curves when we train with SWA and without it.Current behavior :
At the current setting I expect learning rate to decay every epoch up until the end (red line, you can check scheduler implementation yourself and ensure that LR is strictly decreasing after reaching maximum at
lr_ramp_ep
epochs)Expected behavior :
LR-monitor should output same curves for both
stochastic_weight_avg=True
andstochastic_weight_avg=False
flags.The only reason I'm not opening an issue here is because I'm not sure if it is an intended behavior or not, but I'll provide self-contained example just in case :
Also,
pytorch-lightning==1.3.8
,torch==1.8.1+cu111
Beta Was this translation helpful? Give feedback.
All reactions