A trigger specifies a timespot or several timespots during training, and a corresponding action will be taken when the timespot(s) s reached.
Every Epoch
Scala:
val trigger = Trigger.everyEpoch
Python:
trigger = EveryEpoch()
A trigger that triggers an action when each epoch finishs.
Could be used as trigger in setValidation
and setCheckpoint
in Optimizer, and also in TrainSummary.setSummaryTrigger
.
Several Iteration
Scala:
val trigger = Trigger.severalIteration(n)
Python:
trigger = SeveralIteration(n)
A trigger that triggers an action every n
iterations.
Could be used as trigger in setValidation
and setCheckpoint
in Optimizer, and also in TrainSummary.setSummaryTrigger
.
Max Epoch
Scala:
val trigger = Trigger.maxEpoch(max)
Python:
trigger = MaxEpoch(max)
A trigger that triggers an action when training reaches
the number of epochs specified by "max".
Usually used in Optimizer.setEndWhen
.
Max Iteration
Scala:
val trigger = Trigger.maxIteration(max)
Python:
trigger = MaxIteration(max)
A trigger that triggers an action when training reaches
the number of iterations specified by "max".
Usually used in Optimizer.setEndWhen
.