T
- Type of model. For example, MultiLayerNetwork
or ComputationGraph
public class InMemoryModelSaver<T extends Model> extends java.lang.Object implements EarlyStoppingModelSaver<T>
Constructor and Description |
---|
InMemoryModelSaver() |
Modifier and Type | Method and Description |
---|---|
T |
getBestModel()
Retrieve the best model that was previously saved
|
T |
getLatestModel()
Retrieve the most recent model that was previously saved
|
void |
saveBestModel(T net,
double score)
Save the best model (so far) learned during early stopping training
|
void |
saveLatestModel(T net,
double score)
Save the latest (most recent) model learned during early stopping
|
java.lang.String |
toString() |
public void saveBestModel(T net, double score) throws java.io.IOException
EarlyStoppingModelSaver
saveBestModel
in interface EarlyStoppingModelSaver<T extends Model>
java.io.IOException
public void saveLatestModel(T net, double score) throws java.io.IOException
EarlyStoppingModelSaver
saveLatestModel
in interface EarlyStoppingModelSaver<T extends Model>
java.io.IOException
public T getBestModel() throws java.io.IOException
EarlyStoppingModelSaver
getBestModel
in interface EarlyStoppingModelSaver<T extends Model>
java.io.IOException
public T getLatestModel() throws java.io.IOException
EarlyStoppingModelSaver
getLatestModel
in interface EarlyStoppingModelSaver<T extends Model>
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object