We’ll look at MINST Digits images dataset to build image classification neural network using DL4J

Image for post
Image for post

This is the second article of exploring DL4J library to learn deep learning concepts. In this we’ll work with our first image classification problem.


It is of high importance that you finish this tutorial first:


We’ll be using a famous dataset called MNIST (Basically the hello world of image classification). General MNIST dataset consist of 70,000 images of 28×28 pixels, representing handwritten 0–9 digits. 60,000 are part of the training set, which is the set used to train the network, while the remaining 10,000 are part of the test set. Download the .zip file:

If you extract it (for now jst extract it in downloads folder as we’re exploring) you can see the dataset is split into two folders: training and testing, each one containing 10 subfolders, labeled 0 to 9, each one in turn containing thousands (almost 6,000) of image samples of handwritten digits correspondent to the label identified by the subfolder name. …

We’ll build a recommendation engine based on Coursera dataset to recommend courses to user by using a third party service called recombee.

Image for post
Image for post
Photo by Morning Brew on Unsplash

Recombee is a platform that makes it easy for developers to create recommendation engine within minutes. Recombee has a “forever free” mode after the 30 days trial is over, unless you exceed the limits (20K monthly active users, 100K monthly recomms) so it’s a great way to integrate in your business as you can implement it in so many programming languages.

What is a recommendation engine?

A picture speaks a thousand words:

Image for post
Image for post
Source: Human for AI

Recommendation engine in its simplest form of understanding is what you see in the picture above and for this getting started guide it’s enough.

Customers can be similar when they are from same city, or go to same school or are in the same age bracket or there can be many other factors. …

Build Iris Classification Neural Network using Deep Learning for Java (DL4J) library.

Image for post
Image for post
Photo by Alina Grubnyak on Unsplash

This is the first tutorial of a series of tutorials I’ll be writing in which you’ll work on building Neural Networks using DL4J (A Java-based deep learning library).


The only prerequisite is the knowledge of Java. If you have worked with basic Java SE and understand the basic Object-Oriented Programming (OOP) concepts you’ll be good to go. Also, a basic understanding of Neural Network or deep learning and the concepts would be a big plus.


We’ll be using IntelliJ IDEA CE. Download the Community version:

Image for post
Image for post
Download Community Version

Iris Classification Neural Network using DL4J

Open IntelliJ IDEA CE and Create a new project, name it LearningDL4J.

Image for post
Image for post

Open pom.xml file.

Image for post
Image for post

Add the following code in the pom.xml: …


Chaudhry Talha

Passionate about using technology for Social Impact. Let’s connect: https://www.linkedin.com/in/chtalha

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store