-
-
Save Habitats/b69375f8a3ab8f3bc774867ec29ae041 to your computer and use it in GitHub Desktop.
This file contains 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
var net = FeedForward.create(neuralPrefs) | |
val sparkNetwork = new SparkDl4jMultiLayer(sc, net) | |
val testIter: DataSetIterator = new FeedForwardIterator(...) | |
val trainIter: List[DataSet] = new FeedForwardIterator(...).asScala.toList | |
val rddTrain: JavaRDD[DataSet] = sc.parallelize(trainIter) | |
for (i <- 0 until neuralPrefs.epochs) { | |
net = sparkNetwork.fitDataSet(rddTrain, 200, 2) | |
val eval = NeuralEvaluation(net, testIter, i, label) | |
eval.log() | |
testIter.reset() | |
} | |
net |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment