未验证 提交 7cd10025 编写于 作者: D Double_V 提交者: GitHub

Merge pull request #4163 from LDOUBLEV/release/2.3

fix load model
......@@ -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"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册