Skip to Main Content
Java Deep Learning Projects
book

Java Deep Learning Projects

by Md. Rezaul Karim
June 2018
Intermediate to advanced content levelIntermediate to advanced
436 pages
10h 33m
English
Packt Publishing
Content preview from Java Deep Learning Projects

Network creation and training

Now we start creating the network by combining convolutional, max pooling, dense (feedforward), and recurrent (LSTM) layers to classify each frame of a video clip. First, we need to define some hyperparameters and the necessary instantiation, as shown here:

private static MultiLayerConfiguration conf;private static MultiLayerNetwork net; private static String modelPath = "bin/ConvLSTM_Model.zip";private static int NUM_CLASSES;private static int nTrainEpochs = 100;

Here, NUM_CLASSES is the number of classes from UCF101 calculated as the quantity of directories in the dataset base directory:

NUM_CLASSES = reader.labelMap().size();

Then we start the training by calling the networkTrainer() method. Well, as I stated ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java Deep Learning Essentials

Java Deep Learning Essentials

Yusuke Sugomori
Machine Learning in Java - Second Edition

Machine Learning in Java - Second Edition

AshishSingh Bhatia, Bostjan Kaluza
Mastering Java Machine Learning

Mastering Java Machine Learning

Uday Kamath, Krishna Choppella

Publisher Resources

ISBN: 9781788997454Supplemental Content