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 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 and the size is about 500 MB.

You can manually download and restore, or ...

Get Java Deep Learning Projects now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.