提交 9c37d109 编写于 作者: H huangyuxin

optimize the log

上级 4b225b76
......@@ -216,6 +216,7 @@ class U2Trainer(Trainer):
msg += f"{v:>.8f}" if isinstance(v,
float) else f"{v}"
msg += ","
msg = msg[:-1] # remove the last ","
if (batch_index + 1
) % self.config.training.log_interval == 0:
logger.info(msg)
......
......@@ -263,6 +263,7 @@ class Trainer():
msg += f"{v:>.8f}" if isinstance(v,
float) else f"{v}"
msg += ","
msg = msg[:-1] # remove the last ","
logger.info(msg)
data_start_time = time.time()
except Exception as e:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册