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 TgetBestModel()Retrieve the best model that was previously savedTgetLatestModel()Retrieve the most recent model that was previously savedvoidsaveBestModel(T net, double score)Save the best model (so far) learned during early stopping trainingvoidsaveLatestModel(T net, double score)Save the latest (most recent) model learned during early stoppingStringtoString()
-
-
-
Method Detail
-
saveBestModel
public void saveBestModel(T net, double score) throws IOException
Description copied from interface:EarlyStoppingModelSaverSave the best model (so far) learned during early stopping training- Specified by:
saveBestModelin interfaceEarlyStoppingModelSaver<T extends Model>- Throws:
IOException
-
saveLatestModel
public void saveLatestModel(T net, double score) throws IOException
Description copied from interface:EarlyStoppingModelSaverSave the latest (most recent) model learned during early stopping- Specified by:
saveLatestModelin interfaceEarlyStoppingModelSaver<T extends Model>- Throws:
IOException
-
getBestModel
public T getBestModel() throws IOException
Description copied from interface:EarlyStoppingModelSaverRetrieve the best model that was previously saved- Specified by:
getBestModelin interfaceEarlyStoppingModelSaver<T extends Model>- Throws:
IOException
-
getLatestModel
public T getLatestModel() throws IOException
Description copied from interface:EarlyStoppingModelSaverRetrieve the most recent model that was previously saved- Specified by:
getLatestModelin interfaceEarlyStoppingModelSaver<T extends Model>- Throws:
IOException
-
-