-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Hello,
Reading the new Pytorch post about SWA released in 1.6, they recommend to update batch norm statistic after averaging the checkpoints. I notice that avg_checkpoints.py doesn't do it. With the reason that Pytorch team for updating bn statistics, it makes sense that avg_checkpoints.py does it.
The new torch.optim.swa_utils.update_bn is pretty straigh forward. So, it could be copied (I don't know if there is a license conflict) to avoid forcing version 1.6. If you are considering to upgrade to Pytorch 1.6, we could use the new AverageModel class to simplify the script.
Finally, I'm willing to make a PR for both approaches.
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed