public abstract class BaseEarlyStoppingTrainer<T extends Model> extends java.lang.Object implements IEarlyStoppingTrainer<T>
MultiLayerNetwork
or a ComputationGraph
via early stoppingModifier and Type | Field and Description |
---|---|
protected EarlyStoppingConfiguration<T> |
esConfig |
protected T |
model |
Modifier | Constructor and Description |
---|---|
protected |
BaseEarlyStoppingTrainer(EarlyStoppingConfiguration<T> earlyStoppingConfiguration,
T model,
org.nd4j.linalg.dataset.api.iterator.DataSetIterator train,
org.nd4j.linalg.dataset.api.iterator.MultiDataSetIterator trainMulti,
EarlyStoppingListener<T> listener) |
Modifier and Type | Method and Description |
---|---|
EarlyStoppingResult<T> |
fit()
Conduct early stopping training
|
protected abstract void |
fit(org.nd4j.linalg.dataset.DataSet ds) |
protected abstract void |
fit(org.nd4j.linalg.dataset.api.MultiDataSet mds) |
protected void |
reset() |
void |
setListener(EarlyStoppingListener<T> listener)
Set the early stopping listener
|
protected final EarlyStoppingConfiguration<T extends Model> esConfig
protected BaseEarlyStoppingTrainer(EarlyStoppingConfiguration<T> earlyStoppingConfiguration, T model, org.nd4j.linalg.dataset.api.iterator.DataSetIterator train, org.nd4j.linalg.dataset.api.iterator.MultiDataSetIterator trainMulti, EarlyStoppingListener<T> listener)
protected abstract void fit(org.nd4j.linalg.dataset.DataSet ds)
protected abstract void fit(org.nd4j.linalg.dataset.api.MultiDataSet mds)
public EarlyStoppingResult<T> fit()
IEarlyStoppingTrainer
fit
in interface IEarlyStoppingTrainer<T extends Model>
public void setListener(EarlyStoppingListener<T> listener)
IEarlyStoppingTrainer
setListener
in interface IEarlyStoppingTrainer<T extends Model>
protected void reset()