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 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.