mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Merge branch 'master' into more_attn
This commit is contained in:
commit
01b9108619
@ -44,7 +44,7 @@ def load_state_dict(checkpoint_path, use_ema=False):
|
|||||||
raise FileNotFoundError()
|
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)
|
state_dict = load_state_dict(checkpoint_path, use_ema)
|
||||||
model.load_state_dict(state_dict, strict=strict)
|
model.load_state_dict(state_dict, strict=strict)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user