Package ai.djl.training
Class TrainingResult
- java.lang.Object
-
- ai.djl.training.TrainingResult
-
public class TrainingResult extends java.lang.ObjectA class that is responsible for holding the training result produced byTrainer.
-
-
Constructor Summary
Constructors Constructor Description TrainingResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetEpoch()Returns the actual number of epoch.java.util.Map<java.lang.String,java.lang.Float>getEvaluations()Returns the raw evaluation metrics.java.lang.FloatgetTrainEvaluation(java.lang.String key)Returns the evaluation to which the specified key is mapped.java.lang.FloatgetTrainLoss()Returns the train loss.java.lang.FloatgetValidateEvaluation(java.lang.String key)Returns the evaluation to which the specified key is mapped.java.lang.FloatgetValidateLoss()Returns the validate loss.voidsetEpoch(int epoch)Sets the actual number of epoch.voidsetEvaluations(java.util.Map<java.lang.String,java.lang.Float> evaluations)Sets the raw evaluation metrics.java.lang.StringtoString()*
-
-
-
Method Detail
-
getTrainLoss
public java.lang.Float getTrainLoss()
Returns the train loss.- Returns:
- the train loss
-
getValidateLoss
public java.lang.Float getValidateLoss()
Returns the validate loss.- Returns:
- the validate loss
-
getTrainEvaluation
public java.lang.Float getTrainEvaluation(java.lang.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 java.lang.Float getValidateEvaluation(java.lang.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 java.util.Map<java.lang.String,java.lang.Float> getEvaluations()
Returns the raw evaluation metrics.- Returns:
- the raw evaluation metrics
-
setEvaluations
public void setEvaluations(java.util.Map<java.lang.String,java.lang.Float> evaluations)
Sets the raw evaluation metrics.- Parameters:
evaluations- the raw evaluation metrics
-
toString
public java.lang.String toString()
*- Overrides:
toStringin classjava.lang.Object
-
-