From b4f10436cf7e23326a1bf93f29485b9c141a7d72 Mon Sep 17 00:00:00 2001 From: Bobholamovic Date: Tue, 13 Jun 2023 20:39:58 +0800 Subject: [PATCH] Rename variable --- ppcls/utils/save_load.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ppcls/utils/save_load.py b/ppcls/utils/save_load.py index d0e03683..e48d2968 100644 --- a/ppcls/utils/save_load.py +++ b/ppcls/utils/save_load.py @@ -165,8 +165,8 @@ def save_model(net, return if prefix == 'best_model': - uapi_best_model_path = os.path.join(model_path, 'best_model') - _mkdir_if_not_exist(uapi_best_model_path) + best_model_path = os.path.join(model_path, 'best_model') + _mkdir_if_not_exist(best_model_path) _mkdir_if_not_exist(model_path) model_path = os.path.join(model_path, prefix) @@ -188,8 +188,8 @@ def save_model(net, paddle.save(params_state_dict, model_path + ".pdparams") if prefix == 'best_model': - uapi_best_model_path = os.path.join(uapi_best_model_path, 'model') - paddle.save(params_state_dict, uapi_best_model_path + ".pdparams") + best_model_path = os.path.join(best_model_path, 'model') + paddle.save(params_state_dict, best_model_path + ".pdparams") if ema is not None: paddle.save(ema.state_dict(), model_path + ".ema.pdparams") -- GitLab