提交 4870bd37 编写于 作者: S shippingwang

refine

上级 7525da9f
......@@ -145,10 +145,6 @@ def main():
output = output.flatten()
if i >= 10:
test_time += time.time() - start_time
cls = np.argmax(output)
score = output[cls]
logger.info("class: {0}".format(cls))
logger.info("score: {0}".format(score))
fp_message = "FP16" if args.use_fp16 else "FP32"
logger.info("{0}\t{1}\tbatch size: {2}\ttime(ms): {3}".format(
......
......@@ -385,7 +385,7 @@ def run(dataloader, exe, program, fetchs, epoch=0, mode='train'):
metric_list[i].update(m[0], len(batch[0]))
fetchs_str = ''.join([str(m.value)+' '
for m in metric_list]+ [batch_time.value])
logger.info("epoch:{:<3d} {:s} step:{:<4d} {:s}".format(
logger.info("epoch:{:<3d} {:s} step:{:<4d} {:s}s".format(
epoch, mode, idx, fetchs_str))
end_str = ''.join([str(m.mean)+' ' for m in metric_list] + [batch_time.total])
logger.info("END epoch:{:<3d} {:s} {:s}".format(epoch, mode, end_str))
logger.info("END epoch:{:<3d} {:s} {:s}s".format(epoch, mode, end_str))
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册