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

Train and test set preparation

Now that we have created a ComputationGraph, we need to prepare the training and test sets for the fine-tuning stage. But even before that, we define some parameters, such as allowable format and data paths:

public static final Random RAND_NUM_GEN = new Random(seed);public static final String[] ALLOWED_FORMATS = BaseImageLoader.ALLOWED_FORMATS;public static ParentPathLabelGenerator LABEL_GENERATOR_MAKER = new ParentPathLabelGenerator();public static BalancedPathFilter PATH_FILTER = new BalancedPathFilter(RAND_NUM_GEN, ALLOWED_FORMATS, LABEL_GENERATOR_MAKER);

Let's briefly discuss the difference between MultiLayerNetwork and ComputationGraph. In DL4J, there are two types of network composed of multiple layers: ...

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