Package ai.djl.training
Class TrainingResult
- java.lang.Object
-
- ai.djl.training.TrainingResult
-
public class TrainingResult extends java.lang.Object
A 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 int
getEpoch()
Returns the actual number of epoch.java.util.Map<java.lang.String,java.lang.Float>
getEvaluations()
Returns the raw evaluation metrics.java.lang.Float
getTrainEvaluation(java.lang.String key)
Returns the evaluation to which the specified key is mapped.java.lang.Float
getTrainLoss()
Returns the train loss.java.lang.Float
getValidateEvaluation(java.lang.String key)
Returns the evaluation to which the specified key is mapped.java.lang.Float
getValidateLoss()
Returns the validate loss.void
setEpoch(int epoch)
Sets the actual number of epoch.void
setEvaluations(java.util.Map<java.lang.String,java.lang.Float> evaluations)
Sets the raw evaluation metrics.java.lang.String
toString()
*
-
-
-
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:
toString
in classjava.lang.Object
-
-