T
- Type of model. For example, MultiLayerNetwork
or ComputationGraph
public class InMemoryModelSaver<T extends Model> extends 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
|
String |
toString() |
public void saveBestModel(T net, double score) throws IOException
EarlyStoppingModelSaver
saveBestModel
in interface EarlyStoppingModelSaver<T extends Model>
IOException
public void saveLatestModel(T net, double score) throws IOException
EarlyStoppingModelSaver
saveLatestModel
in interface EarlyStoppingModelSaver<T extends Model>
IOException
public T getBestModel() throws IOException
EarlyStoppingModelSaver
getBestModel
in interface EarlyStoppingModelSaver<T extends Model>
IOException
public T getLatestModel() throws IOException
EarlyStoppingModelSaver
getLatestModel
in interface EarlyStoppingModelSaver<T extends Model>
IOException
Copyright © 2018. All rights reserved.