提交 f7a62d94 编写于 作者: W WenmuZhou

fix error in load model

上级 697719ba
......@@ -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
not os.path.exists(pretrained + '.pdparams')):
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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册