pytorch_pfn_extras.training.trigger.Trigger#
- class pytorch_pfn_extras.training.trigger.Trigger#
Bases:
object
Base class for triggers.
Methods
__init__
()load_state_dict
(state)may_fire
(iteration, epoch_len)Flags if the trigger may fire at the current iteration
- __call__(manager)#
Call self as a function.
- Parameters:
manager (ExtensionsManagerProtocol) –
- Return type:
bool
- load_state_dict(state)#
- Parameters:
state (Dict[str, Any]) –
- Return type:
None
- may_fire(iteration, epoch_len)#
Flags if the trigger may fire at the current iteration
This must not alter the trigger state
- Parameters:
iteration (int) –
epoch_len (int) –
- Return type:
bool
- state_dict()#
- Return type:
Dict[str, Any]