提交 b4f10436 编写于 作者: B Bobholamovic 提交者: cuicheng01

Rename variable

上级 d6137854
......@@ -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")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册