diff --git a/timm/models/helpers.py b/timm/models/helpers.py index dfb6b860..adfef550 100644 --- a/timm/models/helpers.py +++ b/timm/models/helpers.py @@ -44,7 +44,7 @@ def load_state_dict(checkpoint_path, use_ema=False): raise FileNotFoundError() -def load_checkpoint(model, checkpoint_path, use_ema=False, strict=False): +def load_checkpoint(model, checkpoint_path, use_ema=False, strict=True): state_dict = load_state_dict(checkpoint_path, use_ema) model.load_state_dict(state_dict, strict=strict)