Shortcuts

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

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources