dp Package Reference Manual

Join the chat at https://gitter.im/nicholas-leonard/dp

dp is a deep learning library designed for streamlining research and development using the Torch7 distribution. It emphasizes flexibility through the elegant use of object-oriented design patterns.

During my time in the LISA Lab as an apprentice of Yoshua Bengio and Aaron Courville, I was inspired by pylearn2 and Theano to build a framework better suited to my needs and style. I have been using it since November 2013, and it has recently undergone major refactoring to allow for a more seemless integration with nn through dpnn.

Among other things, this package includes :

  • common datasets like MNIST, CIFAR-10 and CIFAR-100, preprocessing like Zero-Component Analysis whitening, Global Contrast Normalization, Lecun's Local Contrast Normalization, and facilities for interfacing your own.
  • a framework that abstracts away common usage patterns of the nn and torch7 package such as loading datasets and early stopping.
  • documentation, examples and tutorials;

Tutorials and Examples

In order to help you get up and running we provide a quick neural network tutorial which explains step-by-step the contents of this example script. For a more flexible option that allows input from the command-line specifying different datasources and preprocesses, using dropout, running the code on a GPU/CPU, please consult this script.

A Facial Keypoints tutorial involving the case study of a Kaggle Challenge is also available. It provides an overview of the steps required for extending and using dp in the context of the challenge. And even provides the script so that you can generate your own Kaggle submissions.

The Language Model tutorial examines the implementation of a neural network language model trained on the Billion Words dataset.

In the Data tutorial, we explore different ways to wrap your own data into a DataSource so that it may be used with dp.

A brief (1 hours) overview of Torch7, which includes some details about dp, is available via this NVIDIA GTC Webinar video. In any case, this presentation gives a nice overview of Logistic Regression, Multi-Layer Perceptrons, Convolutional Neural Networks and Recurrent Neural Networks using Torch7.

dp Packages


To use this library, install it via luarocks:

$> luarocks install dp

or clone and make it (recommended):

$> git clone git@github.com:nicholas-leonard/dp.git
$> cd dp
$> luarocks make rocks/dp-scm-1.rockspec 

Optional Dependencies


$> sudo luarocks install cunnx

Other packages

These are some related package :

  • rnn : Recurrent neural network library ;
  • hypero : Simple distributed hyper-optimization library.


We appreciate issues and pull requests of all kind.