pytorch_pfn_extras.training.triggers.IntervalTrigger

class pytorch_pfn_extras.training.triggers.IntervalTrigger(period, unit)

Trigger based on a fixed interval.

This trigger accepts iterations divided by a given interval. There are two ways to specify the interval: per iterations and epochs. Iteration means the number of updates, while epoch means the number of sweeps over the training dataset. Fractional values are allowed if the interval is a number of epochs; the trigger uses the iteration and epoch_detail attributes defined by the manager.

For the description of triggers see get_trigger().

Parameters
  • period (int or float) – Length of the interval. Must be an integer if unit is 'iteration'.

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

__init__(period, unit)

Methods

__init__(period, unit)

get_training_length()

load_state_dict(to_load)

state_dict()