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()
def before_train(self): self._start_time = time.perf_counter() self._total_timer = Timer() self._total_timer.pause()