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 void
initialize()
Initialize the epoch termination condition (often a no-op)boolean
terminate(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 otherwiseString
toString()
-
-
-
Method Detail
-
initialize
public void initialize()
Description copied from interface:EpochTerminationCondition
Initialize the epoch termination condition (often a no-op)- Specified by:
initialize
in interfaceEpochTerminationCondition
-
terminate
public boolean terminate(int epochNum, double score, boolean minimize)
Description copied from interface:EpochTerminationCondition
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 otherwise- Specified by:
terminate
in 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
-
-