Package ai.djl.training
Class TrainingResult
java.lang.Object
ai.djl.training.TrainingResult
A class that is responsible for holding the training result produced by
Trainer.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetEpoch()Returns the actual number of epoch.Returns the raw evaluation metrics.getTrainEvaluation(String key) Returns the evaluation to which the specified key is mapped.Returns the train loss.Returns the evaluation to which the specified key is mapped.Returns the validate loss.voidsetEpoch(int epoch) Sets the actual number of epoch.voidsetEvaluations(Map<String, Float> evaluations) Sets the raw evaluation metrics.toString()*
-
Constructor Details
-
TrainingResult
public TrainingResult()
-
-
Method Details
-
getTrainLoss
Returns the train loss.- Returns:
- the train loss
-
getValidateLoss
Returns the validate loss.- Returns:
- the validate loss
-
getTrainEvaluation
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
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
Returns the raw evaluation metrics.- Returns:
- the raw evaluation metrics
-
setEvaluations
Sets the raw evaluation metrics.- Parameters:
evaluations- the raw evaluation metrics
-
toString
*
-