Class EvaluatorTrainingListener

  • All Implemented Interfaces:
    TrainingListener

    public class EvaluatorTrainingListener
    extends TrainingListenerAdapter
    TrainingListener that records evaluator results.

    Results are recorded for the following stages:

    • TRAIN_EPOCH - This accumulates for the whole epoch and is recorded to a metric at the end of the epoch
    • TRAIN_PROGRESS - This accumulates for progressUpdateFrequency batches and is recorded to a metric at the end
    • TRAIN_ALL - This does not accumulates and records every training batch to a metric
    • VALIDATE_EPOCH - This accumulates for the whole validation epoch and is recorded to a metric at the end of the epoch

    The training and validation evaluators are saved as metrics with names that can be found using metricName(Evaluator, String). The validation evaluators are also saved as model properties with the evaluator name.

    • Constructor Detail

      • EvaluatorTrainingListener

        public EvaluatorTrainingListener()
        Constructs an EvaluatorTrainingListener that updates the training progress the default frequency.

        Current default frequency is every 5 batches.

      • EvaluatorTrainingListener

        public EvaluatorTrainingListener​(int progressUpdateFrequency)
        Constructs an EvaluatorTrainingListener that updates the training progress the given frequency.
        Parameters:
        progressUpdateFrequency - the number of batches to accumulate an evaluator before it is stable enough to output