torchtnt.utils.timer.TimerProtocol¶
-
class
torchtnt.utils.timer.TimerProtocol(*args, **kwargs)¶ Defines a Timer Protocol with time and reset methods and an attribute recorded_durations for storing timings.
-
__init__(*args, **kwargs)¶
Methods
__init__(*args, **kwargs)reset()A method to reset the state of the Timer. time(action_name)A context manager for timing a code block. Attributes
recorded_durations-