#Dowload IMDB data for LSTM example
Here is a snippet to download python code and imdb.pkl
wget http://deeplearning.net/tutorial/code/imdb.py
wget http://deeplearning.net/tutorial/code/lstm.py
wget http://www.iro.umontreal.ca/~lisa/deep/data/imdb.pkl
Then in Python
import imdb
train, valid, test = imdb.load_data(path='imdb.pkl',
n_words=10000, valid_portion=0.05,
maxlen=100)
Create LSTM model using TensorFlow
import imdb
import numpy as np
import tensorflow as tf
from tensorflow.models.rnn import rnn_cell
lstm_size = 100
lstm = rnn_cell.BasicLSTMCell(lstm_size)