提交 d7bab8a6 编写于 作者: R Ross Wightman

Fix strict flag change for checkpoint load.

上级 9c78de8c
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册