|
Safemotion Lib
|
Public Member Functions | |
| __init__ (self, warmup_iter=3) | |
| before_train (self) | |
| after_train (self) | |
| before_step (self) | |
| after_step (self) | |
Protected Attributes | |
| _warmup_iter | |
| _step_timer | |
| _start_time | |
| _total_timer | |
Track the time spent for each iteration (each run_step call in the trainer). Print a summary in the end of training. This hook uses the time between the call to its :meth:`before_step` and :meth:`after_step` methods. Under the convention that :meth:`before_step` of all hooks should only take negligible amount of time, the :class:`IterationTimer` hook should be placed at the beginning of the list of hooks to obtain accurate timing.
| fastreid.engine.hooks.IterationTimer.__init__ | ( | self, | |
| warmup_iter = 3 ) |
Args:
warmup_iter (int): the number of iterations at the beginning to exclude
from timing.
Definition at line 89 of file hooks.py.
| fastreid.engine.hooks.IterationTimer.after_step | ( | self | ) |
Called after each iteration.
Reimplemented from fastreid.engine.train_loop.HookBase.
Definition at line 133 of file hooks.py.
| fastreid.engine.hooks.IterationTimer.after_train | ( | self | ) |
Called after the last iteration.
Reimplemented from fastreid.engine.train_loop.HookBase.
Definition at line 103 of file hooks.py.
| fastreid.engine.hooks.IterationTimer.before_step | ( | self | ) |
Called before each iteration.
Reimplemented from fastreid.engine.train_loop.HookBase.
Definition at line 129 of file hooks.py.
| fastreid.engine.hooks.IterationTimer.before_train | ( | self | ) |
Called before the first iteration.
Reimplemented from fastreid.engine.train_loop.HookBase.
Definition at line 98 of file hooks.py.
|
protected |