mirror of
https://github.com/PaddlePaddle/PaddleOCR.git
synced 2026-09-24 23:33:08 +08:00
Merge pull request #7278 from WenmuZhou/table_pr
fix is_nlp_model not define error in save_model func
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user