提交 b8ee0d6a 编写于 作者: L liuyuhui

format save_step output information

上级 089db953
......@@ -420,7 +420,7 @@ class RunnerBase(object):
dirname = envs.get_global_env(name + "save_checkpoint_path", None)
if dirname is None or dirname == "":
return
dirname = os.path.join(dirname, str(epoch_id))
dirname = os.path.join(dirname, "epoch_" + str(epoch_id))
logging.info("\tsave epoch_id:%d model into: \"%s\"" %
(epoch_id, dirname))
if is_fleet:
......@@ -436,9 +436,11 @@ class RunnerBase(object):
dirname = envs.get_global_env(name + "save_step_path", None)
if dirname is None or dirname == "":
return
dirname = os.path.join(dirname, str(batch_id))
logging.info("\tsave batch_id:%d model into: \"%s\"" %
(batch_id, dirname))
dirname = os.path.join(dirname,
"epoch_" + str(context["current_epoch"]) +
"_batch_" + str(batch_id))
logging.info("\tsave epoch_id:%d, batch_id:%d model into: \"%s\"" %
(context["current_epoch"], batch_id, dirname))
if is_fleet:
if context["fleet"].worker_index() == 0:
context["fleet"].save_persistables(context["exe"], dirname)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册