Class InMemoryModelSaver<T extends Model>
- java.lang.Object
-
- org.deeplearning4j.earlystopping.saver.InMemoryModelSaver<T>
-
- All Implemented Interfaces:
Serializable
,EarlyStoppingModelSaver<T>
public class InMemoryModelSaver<T extends Model> extends Object implements EarlyStoppingModelSaver<T>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InMemoryModelSaver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getBestModel()
Retrieve the best model that was previously savedT
getLatestModel()
Retrieve the most recent model that was previously savedvoid
saveBestModel(T net, double score)
Save the best model (so far) learned during early stopping trainingvoid
saveLatestModel(T net, double score)
Save the latest (most recent) model learned during early stoppingString
toString()
-
-
-
Method Detail
-
saveBestModel
public void saveBestModel(T net, double score) throws IOException
Description copied from interface:EarlyStoppingModelSaver
Save the best model (so far) learned during early stopping training- Specified by:
saveBestModel
in interfaceEarlyStoppingModelSaver<T extends Model>
- Throws:
IOException
-
saveLatestModel
public void saveLatestModel(T net, double score) throws IOException
Description copied from interface:EarlyStoppingModelSaver
Save the latest (most recent) model learned during early stopping- Specified by:
saveLatestModel
in interfaceEarlyStoppingModelSaver<T extends Model>
- Throws:
IOException
-
getBestModel
public T getBestModel() throws IOException
Description copied from interface:EarlyStoppingModelSaver
Retrieve the best model that was previously saved- Specified by:
getBestModel
in interfaceEarlyStoppingModelSaver<T extends Model>
- Throws:
IOException
-
getLatestModel
public T getLatestModel() throws IOException
Description copied from interface:EarlyStoppingModelSaver
Retrieve the most recent model that was previously saved- Specified by:
getLatestModel
in interfaceEarlyStoppingModelSaver<T extends Model>
- Throws:
IOException
-
-