Commit 697719ba authored by WenmuZhou's avatar WenmuZhou
Browse files

fix error in load model

parent 818ab4ed
......@@ -77,7 +77,7 @@ def init_model(config, model, optimizer=None, lr_scheduler=None):
pretrained_model = [pretrained_model]
for pretrained in pretrained_model:
if not (os.path.isdir(pretrained) or
os.path.exists(pretrained + '.pdparams')):
not os.path.exists(pretrained + '.pdparams')):
raise ValueError("Model pretrain path {} does not "
"exists.".format(pretrained))
param_state_dict = paddle.load(pretrained + '.pdparams')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment