public class EpochTrainingListener extends TrainingListenerAdapter
EpochTrainingListener
that tracks epochs.
Adds "epoch" metric with epoch times and saves "epoch" model property with numEpochs
TrainingListener.BatchData, TrainingListener.Defaults
Constructor and Description |
---|
EpochTrainingListener() |
Modifier and Type | Method and Description |
---|---|
int |
getNumEpochs()
Returns the number of epochs.
|
void |
onEpoch(Trainer trainer)
Listens to the end of an epoch during training.
|
void |
onTrainingBegin(Trainer trainer)
Listens to the beginning of training.
|
void |
onTrainingEnd(Trainer trainer)
Listens to the end of training.
|
onTrainingBatch, onValidationBatch
public void onEpoch(Trainer trainer)
onEpoch
in interface TrainingListener
onEpoch
in class TrainingListenerAdapter
trainer
- the trainer the listener is attached topublic void onTrainingBegin(Trainer trainer)
onTrainingBegin
in interface TrainingListener
onTrainingBegin
in class TrainingListenerAdapter
trainer
- the trainer the listener is attached topublic void onTrainingEnd(Trainer trainer)
onTrainingEnd
in interface TrainingListener
onTrainingEnd
in class TrainingListenerAdapter
trainer
- the trainer the listener is attached topublic int getNumEpochs()