In this section, we will implement a language model, using a basic RNN to perform sentiment classification. Code files for the model can found at https://github.com/PacktPublishing/Python-Deep-Learning-Projects/blob/master/Chapter05/1.%20rnn.py.
Implementing basic RNNs
Importing all of the dependencies
This code imports TensorFlow and key dependencies for our RNN:
from utils import *
import tensorflow as tf
from sklearn.cross_validation import train_test_split
import time
Preparing the dataset
The dataset we'll use in this project is the Movie Review Data from Rotten...