diff --git a/ppocr/utils/save_load.py b/ppocr/utils/save_load.py index b762c0bb74b19cd9b21cab3b6b1c4be2e2bbd6ba..1d760e983a635dcc6b48b839ee99434c67b4378d 100644 --- a/ppocr/utils/save_load.py +++ b/ppocr/utils/save_load.py @@ -91,7 +91,7 @@ def init_model(config, model, optimizer=None, lr_scheduler=None): def load_dygraph_params(config, model, logger, optimizer): ckp = config['Global']['checkpoints'] - if ckp and os.path.exists(ckp): + if ckp and os.path.exists(ckp + ".pdparams"): pre_best_model_dict = init_model(config, model, optimizer) return pre_best_model_dict else: