chainer.training.triggers.OnceTrigger

class chainer.training.triggers.OnceTrigger(call_on_resume=False)[source]

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.

Variables
  • finished (bool) – Flag that indicates whether or not this trigger will

  • in the future. This flag is used to determine if the extension (fire) –

  • be initialized after resume. (should) –

Methods

__call__(trainer)[source]

Call self as a function.

serialize(serializer)[source]

Attributes

finished