Class ScoreImprovementEpochTerminationCondition
- java.lang.Object
-
- org.deeplearning4j.earlystopping.termination.ScoreImprovementEpochTerminationCondition
-
- All Implemented Interfaces:
Serializable,EpochTerminationCondition
public class ScoreImprovementEpochTerminationCondition extends Object implements EpochTerminationCondition
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ScoreImprovementEpochTerminationCondition(int maxEpochsWithNoImprovement)ScoreImprovementEpochTerminationCondition(int maxEpochsWithNoImprovement, double minImprovement)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinitialize()Initialize the epoch termination condition (often a no-op)booleanterminate(int epochNum, double score, boolean minimize)Should the early stopping training terminate at this epoch, based on the calculated score and the epoch number? Returns true if training should terminated, or false otherwiseStringtoString()
-
-
-
Method Detail
-
initialize
public void initialize()
Description copied from interface:EpochTerminationConditionInitialize the epoch termination condition (often a no-op)- Specified by:
initializein interfaceEpochTerminationCondition
-
terminate
public boolean terminate(int epochNum, double score, boolean minimize)Description copied from interface:EpochTerminationConditionShould the early stopping training terminate at this epoch, based on the calculated score and the epoch number? Returns true if training should terminated, or false otherwise- Specified by:
terminatein interfaceEpochTerminationCondition- Parameters:
epochNum- Number of the last completed epoch (starting at 0)score- Score calculate for this epoch- Returns:
- Whether training should be terminated at this epoch
-
-