Created
December 17, 2015 02:35
-
-
Save LplusKira/121e51f748c797270538 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
log.info("Reload model ... ") | |
val confFromJson = MultiLayerConfiguration.fromJson(FileUtils.readFileToString(new File(conf_json))) | |
val dis = new DataInputStream(new FileInputStream(coefficient_bin)) | |
val reloadParams = Nd4j.read(dis) | |
dis.close() | |
val model = new MultiLayerNetwork(confFromJson) | |
model.init() | |
model.setParams(reloadParams) | |
model.setListeners(Seq[IterationListener](new ScoreIterationListener(listenerFreq)).asJava) | |
while( iter.hasNext() ){ | |
val eachbatch: DataSet = iter.next() | |
model.fit(eachbatch) | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment