From 7c15d1b7902d7b38f1246d7de587b505cc3585a9 Mon Sep 17 00:00:00 2001 From: WenmuZhou <572459439@qq.com> Date: Mon, 29 Nov 2021 08:38:15 +0000 Subject: [PATCH] change is to does --- ppocr/utils/save_load.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ppocr/utils/save_load.py b/ppocr/utils/save_load.py index a5326edd..f6013a40 100644 --- a/ppocr/utils/save_load.py +++ b/ppocr/utils/save_load.py @@ -57,7 +57,7 @@ def load_model(config, model, optimizer=None): if checkpoints.endswith('.pdparams'): checkpoints = checkpoints.replace('.pdparams', '') assert os.path.exists(checkpoints + ".pdparams"), \ - "The {}.pdparams is not exists!".format(checkpoints) + "The {}.pdparams does not exists!".format(checkpoints) # load params from trained model params = paddle.load(checkpoints + '.pdparams') @@ -106,7 +106,7 @@ def load_pretrained_params(model, path): if path.endswith('.pdparams'): path = path.replace('.pdparams', '') assert os.path.exists(path + ".pdparams"), \ - "The {}.pdparams is not exists!".format(path) + "The {}.pdparams does not exists!".format(path) params = paddle.load(path + '.pdparams') state_dict = model.state_dict() -- GitLab