pytorch_pfn_extras.training.triggers.OnceTrigger

class pytorch_pfn_extras.training.triggers.OnceTrigger(call_on_resume=False)

Trigger based on the starting point of the iteration.

This trigger accepts only once at starting point of the iteration. There are two ways to specify the starting point: only starting point in whole iteration or called again when training resumed.

Parameters

call_on_resume (bool) – Whether the extension is called again or not when restored from a snapshot. It is set to False by default.

finished

Flag that indicates whether or not this trigger will

Type

bool

fire in the future. This flag is used to determine if the extension
should be initialized after resume.
__init__(call_on_resume=False)

Methods

__init__([call_on_resume])

load_state_dict(to_load)

state_dict()

Attributes

finished