This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Deep learning framework with configurable backends

Project Description

neon is NErvana’s pythON based Deep Learning Framework! We have designed it with the following functionality in mind:

  • YAML for easy model specification (inspired by pylearn2)
  • Python for easily adding models and support for many data formats
  • Support for commonly used models: convnets, MLPs, RNNs, LSTMs, autoencoders, RBMs
  • Support for common learning rules, activation functions and cost functions
  • Comparing performance of alternate numeric representations with 32-bit floating point (fp32) for Deep Learning
  • Support for using spearmint for hyperparameter optimization
  • Swappable hardware backends: write code once and then deploy on CPUs, GPUs, or Nervana hardware

Features that are unique to neon include:

  • Tight integration with nervanagpu kernels for fp16 and fp32 (benchmarks) on Maxwell GPUs. These are the fastest implementations of the benchmark deep networks.
  • 4.3s/macrobatch on AlexNet on Titan X (Full run on 1 GPU ~ 45 hrs)
  • Out of the box fp16 AlexNet model that has the same accuracy as fp32
  • Integration with our fork (cudanet) of Alex Krizhevsky’s cuda-convnet2 library for Kepler GPU support
  • Support for our distributed processor (Nervana Engine™) for deep learning.

We use neon internally at Nervana to solve our customers’ problems across many domains. We are hiring across several roles. Apply here!

Getting started

Basic information to get started is below. Please consult the full documentation for more information.


Quick Install

On a Mac OSX or Linux box enter the following to download and install neon, and use it to train your first multi-layer perceptron or convolutional neural networks below.

git clone
cd neon
sudo make install

The above will install neon system-wide. If you don’t have sufficient privileges or would prefer an isolated installation, see our virtualenv based install.

There are several examples built-in to neon in the examples directory for a user to get started. The YAML format is plain-text and can be edited to change various aspects of the model. See the ANNOTATED_EXAMPLE.yaml for some of the definitions and possible choices.

Running a simple MNIST model (on CPU)

neon examples/mlp/mnist-small.yaml

Running an Alexnet model (on GPU)

In fp32:

# for nervangpu (requires Maxwell GPUs)
neon --gpu nervanagpu examples/convnet/i1k-alexnet-fp32.yaml

# for cudanet (works with Kepler or Maxwell GPUs)
neon --gpu cudanet examples/convnet/i1k-alexnet-fp32.yaml

In fp16:

neon --gpu nervanagpu examples/convnet/i1k-alexnet-fp16.yaml

Code organization

backends    --- implementation of different hardware backends
datasets    --- support for common datasets CIFAR-10, ImageNet, MNIST etc.
diagnostics --- hooks to measure timing and numeric ranges
hyperopt    --- hooks for hyperparameter optimization
layers      --- layer code
models      --- model code
optimizers  --- learning rules
transforms  --- activation & cost functions
metrics     --- performance evaluation metrics


The complete documentation for neon is available here. Some useful starting points are:


For any bugs or feature requests please:

  1. Search the open and closed issues list to see if we’re already working on what you have uncovered.
  2. Check that your issue/request has already been addressed in our Frequently Asked Questions (FAQ)
  3. File a new issue or submit a new pull request if you have some code you’d like to contribute

Machine learning OPerations (MOP) Layer

The MOP is an abstraction layer for Nervana’s system software and hardware which includes the Nervana Engine, a custom distributed processor for deep learning.

The MOP consists of linear algebra and other operations required by deep learning. Some MOP operations are currently exposed in neon, while others, such as distributed primitives, will be exposed in later versions as well as in other forthcoming Nervana libraries.

Defining models in a MOP-compliant manner guarantees they will run on all provided backends. It also provides a way for existing Deep Learning frameworks such as theano, torch, and caffe to interface with the Nervana Engine.

Upcoming libraries

We have separate, upcoming efforts on the following fronts:

  • Distributed models
  • Automatic differentiation
  • Integration with Nervana Cloud™


We are releasing neon and nervanagpu under an open source Apache 2.0 License. We welcome you to contact us with your use cases.

Release History

Release History

This version
History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
nervananeon-0.8.1.tar.gz (334.1 kB) Copy SHA256 Checksum SHA256 Source May 4, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting