Class LocalFileGraphSaver
- java.lang.Object
-
- org.deeplearning4j.earlystopping.saver.LocalFileGraphSaver
-
- All Implemented Interfaces:
Serializable
,EarlyStoppingModelSaver<ComputationGraph>
public class LocalFileGraphSaver extends Object implements EarlyStoppingModelSaver<ComputationGraph>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LocalFileGraphSaver(String directory)
Constructor that uses default character set for configuration (json) encodingLocalFileGraphSaver(String directory, Charset encoding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComputationGraph
getBestModel()
Retrieve the best model that was previously savedComputationGraph
getLatestModel()
Retrieve the most recent model that was previously savedvoid
saveBestModel(ComputationGraph net, double score)
Save the best model (so far) learned during early stopping trainingvoid
saveLatestModel(ComputationGraph net, double score)
Save the latest (most recent) model learned during early stoppingString
toString()
-
-
-
Constructor Detail
-
LocalFileGraphSaver
public LocalFileGraphSaver(String directory)
Constructor that uses default character set for configuration (json) encoding- Parameters:
directory
- Directory to save networks
-
-
Method Detail
-
saveBestModel
public void saveBestModel(ComputationGraph 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<ComputationGraph>
- Throws:
IOException
-
saveLatestModel
public void saveLatestModel(ComputationGraph 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<ComputationGraph>
- Throws:
IOException
-
getBestModel
public ComputationGraph getBestModel() throws IOException
Description copied from interface:EarlyStoppingModelSaver
Retrieve the best model that was previously saved- Specified by:
getBestModel
in interfaceEarlyStoppingModelSaver<ComputationGraph>
- Throws:
IOException
-
getLatestModel
public ComputationGraph getLatestModel() throws IOException
Description copied from interface:EarlyStoppingModelSaver
Retrieve the most recent model that was previously saved- Specified by:
getLatestModel
in interfaceEarlyStoppingModelSaver<ComputationGraph>
- Throws:
IOException
-
-