No description or website provided.
Latest commit 04e960a Oct 16, 2016 @khanhptnk committed on GitHub Update
Failed to load latest commit information. Update Oct 15, 2016 code Oct 15, 2016 code Oct 15, 2016 code Oct 15, 2016 change variable name Oct 15, 2016 code Oct 15, 2016


Implementation of recurrent neural network (RNN) and seq2seq models in Chainer. This repo is inspired by Tal Baumel's cnn (now dynet) seq2seq notebook.

The toy task is learning to reverse a string (i.e. given input "abcde", output "edcba"). Implemented models are:

  • Vanilla multi-layer LSTM RNN model.
  • Vanilla encoder-decoder model.
  • Global-attentional encoder-decoder model (Vinyals et al.)

To run the code, please install Chainer and CuDNN first. Then evoke

$ python

To run with different modes, modify Some notable variables are:

  • DEVICE: the code is set to run on CPU (DEVICE = -1), set DEVICE = 0 to run on single GPU.
  • LARGE: size of the data set.
  • ATTEND: whether to use attention or not.

If there are any problems, email me at