From ebe9676605ef22d49ce984665146fa5e599e0014 Mon Sep 17 00:00:00 2001 From: dingsiyu Date: Thu, 27 May 2021 14:13:35 +0800 Subject: [PATCH] fix load model --- ernie-doc/utils/init.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ernie-doc/utils/init.py b/ernie-doc/utils/init.py index a5eebf5..19926ca 100644 --- a/ernie-doc/utils/init.py +++ b/ernie-doc/utils/init.py @@ -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) -- GitLab