Configuration for Gradle, SBT, and More

Configuring your build tool

While we encourage Deeplearning4j, ND4J and DataVec users to employ Maven, it’s worthwhile documenting how to configure build files for other tools, like Ivy, Gradle and SBT – particularly since Google prefers Gradle over Maven for Android projects.

The instructions below apply to all DL4J and ND4J submodules, such as deeplearning4j-api, deeplearning4j-scaleout, and ND4J backends.

Gradle

You can use Deeplearning4j with Gradle by adding the following to your build.gradle in the dependencies block:

compile "org.deeplearning4j:deeplearning4j-core:1.0.0-beta2"

Add a backend by adding the following to your pom.xml:

compile "org.nd4j:nd4j-native-platform:1.0.0-beta2"

You can also swap the standard CPU implementation for GPUs.

SBT

You can use Deeplearning4j with SBT by adding the following to your build.sbt:

libraryDependencies += "org.deeplearning4j" % "deeplearning4j-core" % "1.0.0-beta2"

Add a backend by adding the following to your pom.xml:

libraryDependencies += "org.nd4j" % "nd4j-native-platform" % "1.0.0-beta2"

You can also swap the standard CPU implementation for GPUs.

Ivy

You can use Deeplearning4j with ivy by adding the following to your ivy.xml:

<dependency org="org.deeplearning4j" name="deeplearning4j-core" rev="1.0.0-beta2" conf="build" />

Add a backend by adding the following to your pom.xml:

<dependency org="org.nd4j" name="nd4j-native-platform" rev="1.0.0-beta2" conf="build" />

You can also swap the standard CPU implementation for GPUs.

Leinengen

Clojure programmers may want to use Leiningen or Boot to work with Maven. A Leiningen tutorial is here.

NOTE: You’ll still need to download ND4J, DataVec and Deeplearning4j, or doubleclick on the their respective JAR files file downloaded by Maven / Ivy / Gradle, to install them in your Eclipse installation.

API Reference

API Reference

Detailed API docs for all libraries including DL4J, ND4J, DataVec, and Arbiter.

Examples

Examples

Explore sample projects and demos for DL4J, ND4J, and DataVec in multiple languages including Java and Kotlin.

Tutorials

Tutorials

Step-by-step tutorials for learning concepts in deep learning while using the DL4J API.

Guide

Guide

In-depth documentation on different scenarios including import, distributed training, early stopping, and GPU setup.

Deploying models? There's a tool for that.