未验证 提交 8c82d894 编写于 作者: T Tingquan Gao 提交者: GitHub

Fix the calculation method of batch_time and reader_time (#528)

上级 c213c9fc
......@@ -541,7 +541,11 @@ def run(dataloader,
if mode == "train":
metric_list['lr'].update(lr_scheduler.get_lr())
fetchs_str = ' '.join([str(m.value) for m in metric_list.values()])
fetchs_str = ' '.join([
str(metric_list[key].mean)
if "time" in key else str(metric_list[key].value)
for key in metric_list
])
ips_info = " ips: {:.5f} images/sec.".format(
batch_size / metric_list["batch_time"].avg)
fetchs_str += ips_info
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册