MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / _update_last

Method _update_last

tensorpack/callbacks/prof.py:346–351  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

344 self._update_last()
345
346 def _update_last(self):
347 old_pause = self._timer.is_paused()
348 self._timer.reset()
349 if old_pause:
350 self._timer.pause()
351 self._last_step = self.global_step
352
353 def _trigger(self):
354 steps_per_sec = (self.global_step - self._last_step) / self._timer.seconds()

Callers 2

_before_trainMethod · 0.95
_triggerMethod · 0.95

Calls 3

is_pausedMethod · 0.80
resetMethod · 0.45
pauseMethod · 0.45

Tested by

no test coverage detected