Class TrainingResult

java.lang.Object
ai.djl.training.TrainingResult

public class TrainingResult extends Object
A class that is responsible for holding the training result produced by Trainer.
  • Constructor Details

    • TrainingResult

      public TrainingResult()
  • Method Details

    • getTrainLoss

      public Float getTrainLoss()
      Returns the train loss.
      Returns:
      the train loss
    • getValidateLoss

      public Float getValidateLoss()
      Returns the validate loss.
      Returns:
      the validate loss
    • getTrainEvaluation

      public Float getTrainEvaluation(String key)
      Returns the evaluation to which the specified key is mapped.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the evaluation to which the specified key is mapped
    • getValidateEvaluation

      public Float getValidateEvaluation(String key)
      Returns the evaluation to which the specified key is mapped.
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the evaluation to which the specified key is mapped
    • getEpoch

      public int getEpoch()
      Returns the actual number of epoch.
      Returns:
      the actual number of epoch
    • setEpoch

      public void setEpoch(int epoch)
      Sets the actual number of epoch.
      Parameters:
      epoch - the actual number of epoch
    • getEvaluations

      public Map<String,Float> getEvaluations()
      Returns the raw evaluation metrics.
      Returns:
      the raw evaluation metrics
    • setEvaluations

      public void setEvaluations(Map<String,Float> evaluations)
      Sets the raw evaluation metrics.
      Parameters:
      evaluations - the raw evaluation metrics
    • toString

      public String toString()
      *
      Overrides:
      toString in class Object