Skip to content
Deeplearning4j Examples (DL4J, DL4J Spark, DataVec)
Java Jupyter Notebook Shell Python Kotlin Dockerfile Scala
Branch: master
Clone or download
Latest commit 391ec1b Sep 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Update links Sep 10, 2019
android Staging repo + beta5 Sep 10, 2019
contrib Eclipse Migration Initial Commit Sep 7, 2019
datavec-examples Staging repo + beta5 Sep 10, 2019
dl4j-cuda-specific-examples Staging repo + beta5 Sep 10, 2019
dl4j-examples Merge pull request #897 from rnett/rn_sd_examples Sep 13, 2019
dl4j-examples_javafx Fix Sep 10, 2019
dl4j-spark-examples Workaround for incorrect datavec version in dl4j-spark Sep 12, 2019
jumpy-examples Eclipse Migration Initial Commit Sep 7, 2019
lstm-hdfs Workaround for incorrect datavec version in dl4j-spark Sep 12, 2019
nd4j-examples PR review comments. Sep 12, 2019
pydatavec-examples Eclipse Migration Initial Commit Sep 7, 2019
rl4j-examples Add missing nd4j.version for nd4j.backend in rl4j-examples/pom.xml Sep 12, 2019
shared-utilities Staging repo + beta5 Sep 10, 2019
standalone-sample-project Move javafx examples to separate directory Sep 10, 2019
tf-import-examples Staging repo + beta5 Sep 10, 2019
tutorials Update links Sep 10, 2019
.editorconfig Eclipse Migration Initial Commit Sep 7, 2019
.gitignore Eclipse Migration Initial Commit Sep 7, 2019
CONTRIBUTORS.md Eclipse Migration Initial Commit Sep 7, 2019
LICENSE.txt Eclipse Migration Initial Commit Sep 7, 2019
README.md Move javafx examples to separate directory Sep 10, 2019
pom.xml Move javafx examples to separate directory Sep 10, 2019
runexamples.sh Eclipse Migration Initial Commit Sep 7, 2019

README.md

Deeplearning4J Examples

NOTE: HOW to interpret these examples

Data Loading

In this repository, you may likely see custom datasetiterators - these iterators are only for special examples and 1 off use cases. Consult the gitter if you are not sure how to proceed. Once you find a record reader for your use case, you then should use one of pre made iterators that knows how to interpret record reader output, either RecordReaderDataSetIterator for normal data or SequenceRecordReaderDataSetIterator for sequence data. For more on sequences, please see our rnns page

We have special iterators for 1 off use cases where normal data does not quite exist, or sometimes it is legacy. 99% of the time you should be using datavec and writing your own custom record readers if one of our pre provided ones is not suitable. If you are not sure what is available, please again consult the gitter - In general, you can find both normal record readers and sequence record readers in the datavec javadoc.

Dependencies

Note that this repository contains all dl4j examples for all modules. It will download about 1.5g of dependencies from maven central when you are first starting out. That being said, this makes it easier to get started without worrying about what to download. This examples repository is meant to be a reference point to get started with most common use cases. It is broken up in to modules. If you would like to just have a more minimal/simple, guide please go here

Repository of Deeplearning4J neural net examples:

  • MLP Neural Nets
  • Convolutional Neural Nets
  • Recurrent Neural Nets
  • TSNE
  • Word2Vec & GloVe
  • Anomaly Detection
  • User interface examples.

DL4J-Examples is released under an Apache 2.0 license. By contributing code to this repository, you agree to make your contribution available under an Apache 2.0 license.


Build and Run

Use Maven to build the examples.

mvn clean package

This downloads binaries for all platforms, but we can also append -Djavacpp.platform= with android-arm, android-x86, linux-ppc64le, linux-x86_64, macosx-x86_64, or windows-x86_64 to get binaries for only one platform and produce much smaller archives.

Run the runexamples.sh script to run the examples (requires bash). It will list the examples and prompt you for the one to run. Pass the --all argument to run all of them. (Other options are shown with -h).

./runexamples.sh [-h | --help]

Documentation

For more information, check out deeplearning4j.org and its JavaDoc.

GradientsListenerExample.java in dl4j-examples/src/main/java/org/deeplearning4j/examples/userInterface uses JavaFX. If you're using Java 8 or greater, it should run as is. If you're using Java 7 or an earlier version, you should set JAVAFX_HOME to point to the root directory of the JavaFX 2.0 SDK.

Other Issues

If you notice issues, please log them, and if you want to contribute, submit a pull request. Input is welcome here.

You can’t perform that action at this time.