chainer.training.triggers.ManualScheduleTrigger

class chainer.training.triggers.ManualScheduleTrigger(points, unit)[source]

Trigger invoked at specified point(s) of iterations or epochs.

This trigger accepts iterations or epochs indicated by given point(s). There are two ways to specify the point(s): iteration and epoch. iteration means the number of updates, while epoch means the number of sweeps over the training dataset. Fractional values are allowed if the point is a number of epochs; the trigger uses the iteration and epoch_detail attributes defined by the updater.

Parameters
  • points (int, float, or list of int or float) – time of the trigger. Must be an integer or list of integer if unit is 'iteration'.

  • unit (str) – Unit of the time specified by points. It must be either 'iteration' or 'epoch'.

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

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

  • resume. (should be initialized after) –

Methods

__call__(trainer)[source]

Decides whether the extension should be called on this iteration.

Parameters

trainer (Trainer) – Trainer object that this trigger is associated with. The updater associated with this trainer is used to determine if the trigger should fire.

Returns

True if the corresponding extension should be invoked in this iteration.

Return type

bool

serialize(serializer)[source]
__eq__(value, /)

Return self==value.

__ne__(value, /)

Return self!=value.

__lt__(value, /)

Return self<value.

__le__(value, /)

Return self<=value.

__gt__(value, /)

Return self>value.

__ge__(value, /)

Return self>=value.