Skip to content
Snippets Groups Projects
Unverified Commit d1d32df9 authored by Mashiro's avatar Mashiro Committed by GitHub
Browse files

Change strict_load of EMAHook to False by default (#642)


* [Fix] resume std and mean

* refine docstring

Co-authored-by: default avatarZaida Zhou <58739961+zhouzaida@users.noreply.github.com>
parent 4aad15df
No related branches found
No related tags found
No related merge requests found
......@@ -27,11 +27,12 @@ class EMAHook(Hook):
Defaults to 'ExponentialMovingAverage'.
strict_load (bool): Whether to strictly enforce that the keys of
``state_dict`` in checkpoint match the keys returned by
``self.module.state_dict``. Defaults to True.
``self.module.state_dict``. Defaults to False.
Changed in v0.3.0.
begin_iter (int): The number of iteration to enable ``EMAHook``.
Defaults to 0.
begin_epoch (int): The number of epoch to enable ``EMAHook``. Defaults
to 0.
begin_epoch (int): The number of epoch to enable ``EMAHook``.
Defaults to 0.
**kwargs: Keyword arguments passed to subclasses of
:obj:`BaseAveragedModel`
"""
......@@ -40,7 +41,7 @@ class EMAHook(Hook):
def __init__(self,
ema_type: str = 'ExponentialMovingAverage',
strict_load: bool = True,
strict_load: bool = False,
begin_iter: int = 0,
begin_epoch: int = 0,
**kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment