diff --git a/ppocr/utils/save_load.py b/ppocr/utils/save_load.py index 0c652c8fdc88bd066d7202bb57c046aefbc20cc4..f86125521d19342f63a9fcb3bdcaed02cc4c6463 100644 --- a/ppocr/utils/save_load.py +++ b/ppocr/utils/save_load.py @@ -194,6 +194,9 @@ def save_model(model, _mkdir_if_not_exist(model_path, logger) model_prefix = os.path.join(model_path, prefix) paddle.save(optimizer.state_dict(), model_prefix + '.pdopt') + + is_nlp_model = config['Architecture']["model_type"] == 'kie' and config[ + "Architecture"]["algorithm"] not in ["SDMGR"] if is_nlp_model is not True: paddle.save(model.state_dict(), model_prefix + '.pdparams') metric_prefix = model_prefix