public class LocalFileGraphSaver extends Object implements EarlyStoppingModelSaver<ComputationGraph>
ComputationGraphs learned during early stopping training to the local file system.| Constructor and Description |
|---|
LocalFileGraphSaver(String directory)
Constructor that uses default character set for configuration (json) encoding
|
LocalFileGraphSaver(String directory,
Charset encoding) |
| Modifier and Type | Method and Description |
|---|---|
ComputationGraph |
getBestModel()
Retrieve the best model that was previously saved
|
ComputationGraph |
getLatestModel()
Retrieve the most recent model that was previously saved
|
void |
saveBestModel(ComputationGraph net,
double score)
Save the best model (so far) learned during early stopping training
|
void |
saveLatestModel(ComputationGraph net,
double score)
Save the latest (most recent) model learned during early stopping
|
String |
toString() |
public LocalFileGraphSaver(String directory)
directory - Directory to save networkspublic void saveBestModel(ComputationGraph net, double score) throws IOException
EarlyStoppingModelSaversaveBestModel in interface EarlyStoppingModelSaver<ComputationGraph>IOExceptionpublic void saveLatestModel(ComputationGraph net, double score) throws IOException
EarlyStoppingModelSaversaveLatestModel in interface EarlyStoppingModelSaver<ComputationGraph>IOExceptionpublic ComputationGraph getBestModel() throws IOException
EarlyStoppingModelSavergetBestModel in interface EarlyStoppingModelSaver<ComputationGraph>IOExceptionpublic ComputationGraph getLatestModel() throws IOException
EarlyStoppingModelSavergetLatestModel in interface EarlyStoppingModelSaver<ComputationGraph>IOExceptionCopyright © 2016. All Rights Reserved.