DeepLearning on MNIST data with Torch
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This project will guide you through getting the MNIST data (database of handwritten digits), training a Deep Neural Network, and evaluating the accuracy of the network. For a more academic approach, see:

Make sure you have installed is a tutorial (excuse the a shameless plug):

This project makes use of 'av', which is a Domain Specific Shell designed to focus the tools accessible on the command line. This project setup a standard flow of commands. First though, we need to get av installed:

npm install -g av-shell

Then launch the shell with


Here are the commands you will find useful (note: run them in this order first):

download   # Pulls down the nmist data to the 'raw' folder
convert    # Convert the raw data into a format ingestible by torch
backend    # Use this command to show and set the backend for the neural network
train      # Have the neural network learn from the data
evaluation # Determine how accurate the network has learned from the data

So if you wanted to use a GPU backend like cunn or cudnn, do the following:

backend set cudnn

If you want to use a docker container rather than mess up your local workstation:

role set # now select 'docker'
choose   # Should only be one option 'itorch'
build    # Builds docker container
run      # Launches docker container
# Use the commands described above

To characterize the variation on the performance of the backend (--batchSize=100):

| Platform | backend | time | Version | |---------------------|------- :|:-------|----------| | MBP w/ GTX 970 eGPU | nn | 200ms | | | MBP w/ GTX 970 eGPU | cunn | 80ms | CUDA 7.5 | | MBP w/ GTX 970 eGPU | cudnn | 10ms | cuDNNv5 | | Jetson TX1 | nn | 1500ms | | | Jetson TX1 | cunn | 300ms | CUDA 7.0 | | Jetson TX1 | cudnn | 200ms | cuDNNv5 |

These are all orders of magnitude, per training step/batch