Check code/rationale for the project of learning rationales for neural prediction:
Adam Yala has implemented a Pytorch version of the rationale project!
Check it out at: https://github.com/yala/text_nn
This repo contains Theano implementations of popular neural network components and optimization methods. Source code of the following papers are also available:
[1] Molding CNNs for text: non-linear, non-consecutive convolutions. EMNLP 2015
[2] Semi-supervised Question Retrieval with Gated Convolutions. NAACL 2016
[3] Rationalizing Neural Predictions. EMNLP 2016
- Basic modules including feedforward layer, dropout, word embedding, RNN, LSTM, GRU and CNN
- Optimization methods including SGD, AdaGrad, AdaDelta and Adam
- Advanced modules from recent papers such as attention and gated convolution.
- Transparent to use GPU
The directories code/qa and code/pt contain the implementation of the model described in paper [2]. Datasets and and pre-trained word vectors are available at here.
The directory code/sentiment contains the implementation of the model described in paper [1]. Datasets and and pre-trained word vectors are available at here.
The directory code/rationale contains the implementation of the model described in paper [3].
Theano >= 0.7, Python >= 2.7, Numpy