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

Method _trigger

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

Source from the content-addressed store, hash-verified

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()
355 self._update_last()
356
357 if self._samples_per_step is None:
358 self.trainer.monitors.put_scalar("Throughput (steps/sec)", steps_per_sec)
359 else:
360 self.trainer.monitors.put_scalar("Throughput (samples/sec)", steps_per_sec * self._samples_per_step)

Callers

nothing calls this directly

Calls 3

_update_lastMethod · 0.95
secondsMethod · 0.80
put_scalarMethod · 0.80

Tested by

no test coverage detected