Before training the model using the pre-processed data, let's understand the model definition for this problem. In the code, we define a model class in the model.py file. The class contains four major components, and are as follows:
- Input: We define the TensorFlow placeholders in the model for both input (X) and target (Y).
- Network definition:Â There are four components of the network for this model. They are as follows:Â
- Â Initializing the LSTM cell:Â To do this, we begin by stacking two layers of LSTMs together. We then set the size of the LSTM to be a RNN_SIZE parameter, which is as defined in the code. RNN is then initialized with a zero state.
- Word embeddings:Â We encode the words in the text using word embeddings rather than one-hot encoding. This is done, mainly, to reduce the dimension of the training set, which...