Now we will create the RNN model, which takes a few input parameters, including the following:
- size_layer: The number of units in the RNN cell
- num_layers: The number of hidden layers
- embedded_size: The size of the embedding
- dict_size: The vocabulary size
- dimension_output: The number of classes we need to classify
- learning_rate: The learning rate of the optimization algorithm
The architecture of our RNN model consists of the following parts:
- Two placeholders; one to feed sequence data into the model and the second for the output
- A variable to store the embedding lookup from the dictionary
- Then, add the RNN layer with multiple basic RNN cells
- Create weight and bias variables
- Compute logits
- Compute loss