Safemotion Lib
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
fastreid.engine.hooks.PeriodicCheckpointer Class Reference
Inheritance diagram for fastreid.engine.hooks.PeriodicCheckpointer:
fastreid.engine.train_loop.HookBase

Public Member Functions

 before_train (self)
 
 after_step (self)
 
- Public Member Functions inherited from fastreid.engine.train_loop.HookBase
 after_train (self)
 
 before_step (self)
 

Public Attributes

 max_iter
 

Detailed Description

Same as :class:`fastreid.utils.checkpoint.PeriodicCheckpointer`, but as a hook.
Note that when used as a hook,
it is unable to save additional data other than what's defined
by the given `checkpointer`.
It is executed every ``period`` iterations and after the last iteration.

Definition at line 175 of file hooks.py.

Member Function Documentation

◆ after_step()

fastreid.engine.hooks.PeriodicCheckpointer.after_step ( self)
Called after each iteration.

Reimplemented from fastreid.engine.train_loop.HookBase.

Definition at line 187 of file hooks.py.

187 def after_step(self):
188 # No way to use **kwargs
189 self.step(self.trainer.iter)
190
191

◆ before_train()

fastreid.engine.hooks.PeriodicCheckpointer.before_train ( self)
Called before the first iteration.

Reimplemented from fastreid.engine.train_loop.HookBase.

Definition at line 184 of file hooks.py.

184 def before_train(self):
185 self.max_iter = self.trainer.max_iter
186

Member Data Documentation

◆ max_iter

fastreid.engine.hooks.PeriodicCheckpointer.max_iter

Definition at line 185 of file hooks.py.


The documentation for this class was generated from the following file: