Skip to content

Latest commit

 

History

History
180 lines (141 loc) · 14.1 KB

File metadata and controls

180 lines (141 loc) · 14.1 KB

Eclipse Deeplearning4J Examples

This project contains a set of examples that demonstrate use of the high level DL4J API to build a variety of neural networks. The DL4J ecosystem also allows users to build neural networks with SameDiff (part of the ND4J library) with a more fine grained API. More information on that can be found here

The pom file in this project can be used as a template for a user's own project. The examples in this project and what they demonstrate are briefly described below. This is also the recommended order to explore them in.

Go back to the main repository page to explore other features/functionality of the Eclipse Deeplearning4J ecosystem. File an issue here to request new features.

QUICKSTART

Modeling Examples

Feedforward Neural Networks
Classification
Regression
Unsupervised
Convolutional Neural Networks
Recurrent Neural Networks
  • UCISequenceClassification.java Time series (sequence) classification on the UCI syntetic control time series dataset
  • MemorizeSequence.java Train a RNN to memorize a sequence of characters
  • RNNEmbedding.java Use an EmbeddingLayer (equivalent to using a DenseLayer with a one-hot representation for the input) as the first layer in an RNN
  • VideoFrameClassifier.java Classify shapes that appear in a video frame. Demonstrates how to combine RNN, CNN and fully connected dense layers in a single neural network. This is a memory consuming example. You need at least 7G of off heap memory. Refer here to configure memory off heap.
Variational Auto Encoder
  • VaeMNISTAnomaly.java Unsupervised anomaly detection on MNIST using a variational autoencoder
  • VaeMNIST2dPlots.java Train a variational autoencoder on MNIST and plot MNIST digit reconstructions vs. the latent space as well as the latent space values for the MNIST test set as training progresses

Features

ADVANCED

Modeling Examples

Computer Vision
Natural Language Processing
Text Classification

With pretrained word2vec:

Generating Embeddings:

Modeling with a word2vec model trained on a custom corpus:

Char Modelling
Other Sequence Modeling Examples
Specific Models and Special Architectures

Features

Customizing DL4J

NOTE: SameDiff which is part of ND4J gives users a way to customize DL4J. More information on that is found here

Performance
Debugging
TransferLearning

Demonstrates use of the dl4j transfer learning API which allows users to construct a model based off an existing model by modifying the architecture, freezing certain parts selectively and then fine tuning parameters. Read the documentation for the Transfer Learning API at https://deeplearning4j.konduit.ai/tuning-and-training/transfer-learning.

  • EditLastLayerOthersFrozen.java Modifies just the last layer in vgg16, freezes the rest and trains the network on the flower dataset.
  • FeaturizedPreSave.java & FitFromFeaturized.java Save time on the forward pass during multiple epochs by "featurizing" the datasets. FeaturizedPreSave saves the output at the last frozen layer and FitFromFeaturize fits to the presaved data so you can iterate quicker with different learning parameters.
  • EditAtBottleneckOthersFrozen.java A more complex example of modifying model architecure by adding/removing vertices
  • FineTuneFromBlockFour.java Reads in a saved model (training information and all) and fine tunes it by overriding its training information with what is specified