Are SWA BN stats being updated before val_loop()
?
#8809
Unanswered
chanshing
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
Uh oh!
There was an error while loading. Please reload this page.
-
Is the
StochasticWeightAveraging
implementation updating the BN stats before a validation starts?I had a look and it doesn't seem so, or I may have missed it. It seems to only update the BN stats at the very end of all training, but we also need to update them for validation, as shown in the original implementation: https://github.com/timgaripov/swa/blob/411b2fcad59bec60c6c9eb1eb19ab906540e5ea2/train.py#L143-L161
We can see in the last few lines that it is updating the
swa_model
BN stats right before validation.I was hoping that someone more familiar with the lightning implementation can help clarify my concern.
Beta Was this translation helpful? Give feedback.
All reactions