From d1a7d35c4b849c0fa82b7109a3b1d54e53940f57 Mon Sep 17 00:00:00 2001 From: YukSing <39983134+YukSing12@users.noreply.github.com> Date: Sun, 23 May 2021 19:16:01 +0800 Subject: [PATCH] Update save_load.py Fixed variable name --- ppocr/utils/save_load.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ppocr/utils/save_load.py b/ppocr/utils/save_load.py index e69b330f..3d1c5c35 100644 --- a/ppocr/utils/save_load.py +++ b/ppocr/utils/save_load.py @@ -80,9 +80,9 @@ def init_model(config, model, logger, optimizer=None, lr_scheduler=None): """ load model from checkpoint or pretrained_model """ - gloabl_config = config['Global'] - checkpoints = gloabl_config.get('checkpoints') - pretrained_model = gloabl_config.get('pretrained_model') + global_config = config['Global'] + checkpoints = global_config.get('checkpoints') + pretrained_model = global_config.get('pretrained_model') best_model_dict = {} if checkpoints: assert os.path.exists(checkpoints + ".pdparams"), \ @@ -105,7 +105,7 @@ def init_model(config, model, logger, optimizer=None, lr_scheduler=None): logger.info("resume from {}".format(checkpoints)) elif pretrained_model: - load_static_weights = gloabl_config.get('load_static_weights', False) + load_static_weights = global_config.get('load_static_weights', False) if not isinstance(pretrained_model, list): pretrained_model = [pretrained_model] if not isinstance(load_static_weights, list):