Reccurent Attention Model with Chainer based on the following paper
arXiv:1406.6247: Recurrent Models of Visual Attention [Volodymyr Mnih+ 2014]
- RAM model difinition file (Chainer)
- script for training the model on MNIST
- script to run the model on MNIST
- hyper-params to get the best accuracy in the paper
- multi-scale glimpse
- models to solve "Translated MNIST" task
Training the model without LSTM takes a day with CPU (reaches 96% accuracy)
Training the model with LSTM takes ??? with CPU
(still searching for the hyper-parameters to get the best accuracy in the paper...)
Python(2 or 3), Chainer, scikit-learn, PIL, tqdm
➜ python train.py
If you use a GPU, add the option "-g deviceID
".
When you use LSTM units in core RNN layer, add the option "--lstm".
(better performance but a little time consuming with LSTMs)
➜ python train.py -g 0 --lstm
After training, you can get predictions by the trained model.
➜ python predict.py -m ram_wolstm.chainermodel