From 43445b51d7f95f0ab7f90062e0932cbc356a55b7 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Fri, 24 Sep 2021 03:06:07 +0000 Subject: [PATCH] fix load model --- tools/export_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/export_model.py b/tools/export_model.py index cae87aca..71ecc63b 100755 --- a/tools/export_model.py +++ b/tools/export_model.py @@ -26,7 +26,7 @@ from paddle.jit import to_static from ppocr.modeling.architectures import build_model from ppocr.postprocess import build_post_process -from ppocr.utils.save_load import init_model +from ppocr.utils.save_load import load_dygraph_params from ppocr.utils.logging import get_logger from tools.program import load_config, merge_config, ArgsParser @@ -99,7 +99,7 @@ def main(): else: # base rec model config["Architecture"]["Head"]["out_channels"] = char_num model = build_model(config["Architecture"]) - init_model(config, model) + _ = load_dygraph_params(config, model, logger, None) model.eval() save_path = config["Global"]["save_inference_dir"] -- GitLab