提交 ff7ab33b 编写于 作者: W WuHaobo

rewrite the misc to solve the display log

上级 fa8f585b
......@@ -44,6 +44,11 @@ class AverageMeter(object):
def total(self):
return '[{self.name}_sum: {self.sum:{self.fmt}}]'.format(self=self)
@property
def total_minute(self):
return '[{self.name}_sum: {s:{self.fmt}} min]'.format(
s=self.sum / 60, self=self)
@property
def mean(self):
return '[{self.name}_avg: {self.avg:{self.fmt}}]'.format(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册