示例#1
0
 def __init__(self, warmup_iter=3):
     """
     Args:
         warmup_iter (int): the number of iterations at the beginning to exclude
             from timing.
     """
     self._warmup_iter = warmup_iter
     self._step_timer = Timer()
示例#2
0
 def before_train(self):
     self._start_time = time.perf_counter()
     self._total_timer = Timer()
     self._total_timer.pause()