未验证 提交 89472dd9 编写于 作者: Z zhanghan 提交者: GitHub

Merge pull request #684 from dingsiyu/ernie-doc

fix load model
......@@ -103,9 +103,9 @@ def init_model(args, exe, startup_prog):
init_path = args.init_pretraining_params
elif args.do_val or args.do_test:
init_path = args.init_checkpoint or args.init_pretraining_params
init_path = args.init_pretraining_params
if not init_path:
raise ValueError("args 'init_checkpoint' should be set if"
raise ValueError("args 'init_pretraining_params' should be set if"
"only doing validation or testing!")
init_func = init_checkpoint
print("init pretraining params from ", args.init_checkpoint if args.init_checkpoint else args.init_pretraining_params)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册