From 697719ba3c7db4d1883ce318cb7500151b9e02fd Mon Sep 17 00:00:00 2001 From: WenmuZhou Date: Thu, 15 Jul 2021 16:06:24 +0800 Subject: [PATCH] fix error in load model --- ppocr/utils/save_load.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppocr/utils/save_load.py b/ppocr/utils/save_load.py index 1d760e98..df599706 100644 --- a/ppocr/utils/save_load.py +++ b/ppocr/utils/save_load.py @@ -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 - os.path.exists(pretrained + '.pdparams')): + not os.path.exists(pretrained + '.pdparams')): raise ValueError("Model pretrain path {} does not " "exists.".format(pretrained)) param_state_dict = paddle.load(pretrained + '.pdparams') -- GitLab