- Python 3.5
- Tensorflow 1.2
This repository has the code that accompanies the LTM talk on text classification with RNNs.
This is intended to demonstrate how to go about implementing many of the recently developed architectures in Deep NLP. There are many more complex combinations of these tools you could use - mix and match should be quite straight forward.
This is not intended to be a best practice guide, exceptionally cutting edge or most efficient. Its meant to be easy to follow and to encourage people to get stuck in!
- BasicRNN - A simple RNN classifier using BasicRNNCell
- BasicBidirectionalRNN - A Bidirectional RNN classifier using BasicRNNCell
- BasicBidirectionalRNN-MeanPooling - A Bidirectional RNN with Mean pooling to aggregate hidden states
- BasicBidirectionalRNN-MaxPooling - A Bidirectional RNN with Max pooling to aggregate hidden states
- BasicRNNAttention - A unidirectional RNN with attention mechanism
- GRURNN - A GRU RNN classifier using GRUCell
- GRUBidirectionalRNN-MeanPooling - A Bidirectional GRU RNN with Mean pooling to aggregate hidden states
- GRUBidirectionalRNN-MaxPooling - A Bidirectional GRU RNN with Max pooling to aggregate hidden states
- LSTMRNN - An RNN classifier using LSTMCell
- Lecture 8 of CS224n Slides
- First part of WildML blog on RNNs Blog
- WildML blog of RNNs in Tensorflow. Blog - Some features/locations may have changed between tensorflow versions.
- Read the documentation about dynamic_rnn, and cell types, on tensorflow website. dynamic_rnn BasicRNNCell
- BasicRNN
- Lecture 9 CS224n Slides
- Colah's Blog on LSTMs Blog
- Read the documentation about GRUs and LSTMs, on tensorflow website. LSTM GRU
- GRURNN
- LSTMRNN
- Later part of WildML blog on RNNs Blog
- Oxford Deep NLP course Lecture 5
- Read tensorflow documentation about bidirectional_dynamic_rnn
- BasicBidirectionalRNN
- Modify this code to run bidirectional LSTM and GRU networks.
- Oxford Deep NLP Conditional Language Modelling with attention Slides
- BasicBidirectionalRNN-MeanPooling
- BasicBidirectionalRNN-MaxPooling
- GRUBidirectionalRNN-MeanPooling
- GRUBidirectionalRNN-MaxPooling
- Oxford Deep NLP Conditional Language Modelling with attention Slides
- Wild ML Post on attention Blog
- Hierchical Attention Networks - Zhang, 2015 Paper
- BasicRNNAttention
- Modify this code to run attention over an LSTM network.
Apply these techniques to other datasets, some examples: