fixed print bug when using load_model args

This commit is contained in:
lbin 2019-09-17 17:26:57 +08:00
parent a93fdb0f78
commit e7f5b9eccc
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ def load_model(model, model_path, optimizer=None, resume=False,
if state_dict[k].shape != model_state_dict[k].shape:
print('Skip loading parameter {}, required shape{}, '\
'loaded shape{}. {}'.format(
k, model_state_dict[k].shape, state_dict[k].shape) + msg)
k, model_state_dict[k].shape, state_dict[k].shape, msg))
state_dict[k] = model_state_dict[k]
else:
print('Drop parameter {}.'.format(k) + msg)