diff --git a/mmengine/hooks/ema_hook.py b/mmengine/hooks/ema_hook.py index cb8764d5bb..bad7d8f86a 100644 --- a/mmengine/hooks/ema_hook.py +++ b/mmengine/hooks/ema_hook.py @@ -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):