Skip to content

Instantly share code, notes, and snippets.

View LplusKira's full-sized avatar
🐙
focusing on Microsoft/pai

Po-Kai Chang LplusKira

🐙
focusing on Microsoft/pai
View GitHub Profile
...
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()
val conf: MultiLayerConfiguration = new NeuralNetConfiguration.Builder()
.regularization(true).l2(2e-6)
.seed(luckyseed)
.iterations(20)
.list(3)
...
.build();
val iter: DataSetIterator = new GDataSetIteratorTrain(...)