Skip to content

Instantly share code, notes, and snippets.

View raghavgurbaxani's full-sized avatar

Raghav Gurbaxani raghavgurbaxani

  • Amazon
  • United States
View GitHub Profile
@raghavgurbaxani
raghavgurbaxani / imdb_lstm.py
Created June 25, 2018 19:43
Embedding Layer Float 16
'''Trains an LSTM model on the IMDB sentiment classification task.
The dataset is actually too small for LSTM to be of any advantage
compared to simpler, much faster methods such as TF-IDF + LogReg.
# Notes
- RNNs are tricky. Choice of batch size is important,
choice of loss and optimizer is critical, etc.
Some configurations won't converge.