Training the CNNs and saving the trained models

So far, we have seen how to prepare the training set; now we have a challenge ahead. We have to train 234,545 images. Although the testing phase would be less exhaustive with only 500 images, it's better to train each CNN using batch-mode using DL4j's MultipleEpochsIterator. Here's a list of important hyperparameters and their details:

  • Layers: As we have already observed with our simple 5 layers MNIST, we received outstanding classification accuracy, which is very promising. Here I will try to construct a similar network having.
  • The number of samples: If you're training all the images, it will take too long. If you train using the CPU, not the GPU, it will take days. When I tried with 50,000 ...

Get Scala Machine Learning Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.