Timer that triggers at most once every N seconds or once every N steps.
__init__( every_secs=None, every_steps=None )
Initialize self. See help(type(self)) for accurate signature.
Returns the last triggered time step or None if never triggered.
Resets the timer.
Return true if the timer should trigger for the specified step.
step: Training step to trigger on.
True if the difference between the current time and the time of the last
every_secs, or if the difference between the current
step and the last triggered step exceeds
every_steps. False otherwise.
Update the last triggered time and step number.
step: The current step.
(elapsed_time, elapsed_steps), where
elapsed_time is the number
of seconds between the current trigger and the last one (a float), and
elapsed_steps is the number of steps between the current trigger and
the last one. Both values will be set to
None on the first trigger.