O'Reilly logo

Java Deep Learning Projects by Md. Rezaul Karim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Network training

First, we create a MultiLayerNetwork  using the preceding MultiLayerConfiguration. Then we initialize the network and start the training on the training set:

MultiLayerNetwork model = new MultiLayerNetwork(MLPconf);model.init();log.info("Train model....");for( int i=0; i<numEpochs; i++ ){    model.fit(trainingDataIt);        }

In the preceding code block, we start training the model by invoking the model.fit() on the  training set (trainingDataIt in our case). Now we will discuss how we prepared the training and test set. Well, for reading the training set or test set that are in an inappropriate format (features are numeric and labels are integers), I have created a method called readCSVDataset():

private static DataSetIterator readCSVDataset(String ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required