Deep Learning in Java – Getting Started With Deep Netts

This is a step by step guide for downloading, installing, and running a minimal example.

  1. Requirements
  2. Download
  3. Installation
  4. Running first deep learning example (Hello world!)

1. Requirements

Java 8 or higher
Deep Netts requires Java version 8 or higher installed.
Java is available for download at

Apache Maven Build Tool
Maven build tool is the easiest and recommended way to use Deep Netts.
Maven is available for download for free from
Maven installation is just unpacking the downloaded archive and setting environment variables
For more details depending on OS see

2. Download

Deep Netts is available for free download from here
The download package includes both the Deep Learning IDE and Java library.

3. Installation

3.1. Deep Learning IDE Installation

Deep Learning IDE installation is performed by unzipping the provided application zip file:

  1. Unzip downloaded package
  2. Unzip provided in the distribution package (deepnetts/
  3. Start Deep Netts by running

deepnettsplatform/bin/deepnettsplatform64.exe for Windows or
deepnettsplatform/bin/ for Mac or Linux. For Linux make sure that the file has executable permissions.
Or make sure that it does run and the following command: chmod +x

3.2. Local Maven installation of Deep Netts library

To be able to use Deep Netts in your Maven-based Java applications install provided jar files (including license jar) into your local Maven repository. You can do that using scripts provided in the distribution package:

ImportToLocalMaven.bat             for Windows               for Linux and Mac

If everything went well, after running the import scripts you should be able to find Deep Netts library and license in  .m2/com/deepnetts directory. Location of your local Maven repository is commonly  {USER_DIR}/.m2
Where {USER_DIR} is your user home directory c:\Users\Username on Win or /home/username on Linux

3.3. Adding dependencies to Deep Netts library in your Java project

Maven Based Java project

To add Deep Netts to your Maven based Java project, copy and paste the following snippets to <dependencies> section in pom.xml file of your project.



This will add Deep Netts library and license file to your project and all related dependencies.

ANT Based Java Project

To add Deep Netts to your ANT based project, add all jar files provided in DeepNettsEngine directory from downloaded  Deep Netts distribution to your project.

4. Running first deep learning example (hello world)

Iris Flowers Classification – A Multi Class Classification task. Assign flower to one of three categories based on their dimensions. You can run this example from your favourite IDE using maven project at Examples/deepnetts-examples or from th command line using following commands:

cd Examples/deepnetts-examples
mvn clean package
mvn exec:java -Dexec.mainClass=deepnetts.examples.IrisFlowersClassification

public class IrisFlowersClassification {

    private static final Logger LOGGER = LogManager.getLogger(DeepNetts.class.getName());

    public static void main(String[] args) throws DeepNettsException, IOException {
        // load iris data  set
        DataSet dataSet = DataSets.readCsv("datasets/iris-flowers.csv", 4, 3, true, ",");
        TrainTestPair trainTest = DataSets.trainTestSplit(dataSet, 0.65);

        // normalize data using max normalization
        MaxNormalizer norm = new MaxNormalizer(trainTest.getTrainingeSet());
        // create instance of feed forward neural network using builder
        FeedForwardNetwork neuralNet = FeedForwardNetwork.builder()
                .addFullyConnectedLayer(8, ActivationType.TANH)
                .addOutputLayer(3, ActivationType.SOFTMAX)
        // create and configure instanceof backpropagation trainer
        BackpropagationTrainer trainer = neuralNet.getTrainer();

        ClassifierEvaluationResult ceResult = Evaluators.evaluateClassifier(neuralNet, trainTest.getTestSet());
       "Classification performance measure" + System.lineSeparator());;
        // shutdown the thread pool


Next Steps

Scroll to Top