Setting up a deep RNN model
The RNN architecture is composed of input, hidden, and output layers. A RNN network can be made deep by decomposing the hidden layer into multiple groups or by adding computational nodes within RNN architecture such as including model computation such as multilayer perceptron for micro learning. The computational nodes can be added between input-hidden, hidden-hidden, and hidden-output connection. An example of a multilayer deep RNN model is shown in the following figure:
An example of two-layer Deep Recurrent Neural Network architecture
How to do it...
The RNN models in TensorFlow can easily be extended to Deep RNN models by using MultiRNNCell
. The previous rnn
function can be replaced with the stacked_rnn
function to achieve a deep RNN architecture:
- Define the number of layers in the deep RNN architecture:
num_layers <- 3
- Define a
stacked_rnn
function to perform multi-hidden layers deep RNN:
stacked_rnn<-function(x, weight, bias){ # Unstack input into step_size...