MCPcopy Create free account
hub / github.com/pytorch/examples / summary

Method summary

imagenet/main.py:475–488  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

473 return fmtstr.format(**self.__dict__)
474
475 def summary(self):
476 fmtstr = ''
477 if self.summary_type is Summary.NONE:
478 fmtstr = ''
479 elif self.summary_type is Summary.AVERAGE:
480 fmtstr = '{name} {avg:.3f}'
481 elif self.summary_type is Summary.SUM:
482 fmtstr = '{name} {sum:.3f}'
483 elif self.summary_type is Summary.COUNT:
484 fmtstr = '{name} {count:.3f}'
485 else:
486 raise ValueError('invalid summary type %r' % self.summary_type)
487
488 return fmtstr.format(**self.__dict__)
489
490
491class ProgressMeter(object):

Callers 1

display_summaryMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected