--- lstm.py.orig 2015-01-16 17:20:22.075153409 -0800 +++ lstm_reverse.py 2015-01-16 17:21:10.243152608 -0800 @@ -582,6 +582,9 @@ load_data, prepare_data = get_dataset("imdb") train, valid, test = load_data(n_words=n_words, valid_portion=0.05, maxlen=100) +train = ([r[::-1] for r in train[0]], train[1]) +valid = ([r[::-1] for r in valid[0]], valid[1]) +test = ([r[::-1] for r in test[0]], test[1]) print 'Loading data: Done' print "See the comment at the end of this cell to train the model."