mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Fix strict flag change for checkpoint load.
This commit is contained in:
parent
9c78de8c02
commit
d7bab8a6c5
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user