This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exponential Moving Average of Weights (EMA) (#138)
Summary: EMA as used in "Fast and Accurate Model Scaling" to improve accuracy. Note that EMA of model weights is nearly free computationally (if not computed every iter), hence EMA weights area always computed/stored. Saving/loading checkpoints has been updated, but the code is backward compatible with checkpoints that do not store the ema weights. Details: -config.py: added EMA options -meters.py: generalized to allow for ema meter -net.py: added update_model_ema() to compute model ema -trainer.py: added updating/testing/logging of ema model -checkpoint.py: save/load_checkpoint() also save/load ema weights Pull Request resolved: #138 Reviewed By: theschnitz, vaibhava0 Differential Revision: D28204356 Pulled By: pdollar fbshipit-source-id: 633969856c4359b663cb6811325c3489b74ccf2d
- Loading branch information
1 parent
d0a090c
commit 2c152a6
Showing
5 changed files
with
93 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters