diff --git a/ppocr/utils/save_load.py b/ppocr/utils/save_load.py index df599706..1d760e98 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 - not os.path.exists(pretrained + '.pdparams')): + os.path.exists(pretrained + '.pdparams')): raise ValueError("Model pretrain path {} does not " "exists.".format(pretrained)) param_state_dict = paddle.load(pretrained + '.pdparams')