The basic workflow for creating RNN models in low-level TensorFlow library is almost the same as MLP:
- First create the input and output placeholders of shape (None, # TimeSteps, # Features) or (Batch Size, # TimeSteps, # Features)
- From the input placeholder, create a list of length # TimeSteps, containing Tensors of Shape (None, #Features) or (Batch Size, # Features)
- Create a cell of the desired RNN type from the tf.rnn.rnn_cell module
- Use the cell and the input tensor list created previously to create a static or dynamic RNN
- Create the output weights and bias variables, and define the loss and optimizer functions
- For the required number of epochs, train the model using the loss and optimizer functions
This basic workflow would be demonstrated with the example code in the next chapter. Let us look at the various classes available to support the previous workflow...