mnoukhov / theano-mnist

Good theano basics for MNIST using Blocks, Fuel, and Lasagne

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

theano-mnist

A great basic starter to using theano the right way (or my way at least)

Uses lasagne (model definition), fuel (data processing), and blocks (training loop) to create a clean and extensible MNIST classifier using LeNet, also can serve as a great template for any project

why

In building neural networks, I like to separate things into model, data, and training loop. By using these three libraries, this becomes simple and easy. Blocks main loop and extensions become especially useful for extending the code to your specific needs.

why lasagne and not blocks.bricks

I find the structuring of networks in lasagne to be more intuitive and more similar to tensorflow (and tf-slim), making it easier to implement some tensorflow models in theano

requirements

install required libraries

prepare mnist data

  • follow this guide to download and create mnist.hdf5

running

python train.py BATCH_SIZE LEARNING_RATE NUM_EPOCHS

TODO

  • add validation/testing
  • add visualization (blocks-extras' live plotting or mimir logging into jupyter)
  • add model saving/loading (add my own lasagne saver/loader)

About

Good theano basics for MNIST using Blocks, Fuel, and Lasagne

License:MIT License


Languages

Language:Python 100.0%