Architecture choice and adoption

As mentioned earlier, we will be reusing the VGG-16 pretrained model, which is already trained with different images of cat and dog breeds from ImageNet (see the list here at http://www.image-net.org/challenges/LSVRC/2014/results#clsloc). The original VGG-16 model had 1,000 classes of images to be predicted as outlined in the following diagram:

Original VGG-16 model architecture

Fortunately, the trained model and network weights are already available on the DL4J website (see http://blob.deeplearning4j.org/models/vgg16_dl4j_inference.zip) and the size is about 500 MB.

You can manually download and restore, or ...

Get Java Deep 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.