Constructing the TensorFlow graph is probably the most complex part of building a neural network. We will precisely examine all of the steps so you can obtain a full understanding.
The TensorFlow graph can be viewed as a direct implementation of the recurrent neural network model, including all equations and algorithms introduced in Chapter 1, Introducing Recurrent Neural Networks.
First, we start with setting the parameters of the model, as shown in the following example:
X = tf.placeholder(tf.float32, shape=[None, num_classes, 1])Y = tf.placeholder(tf.float32, shape=[None, num_classes])num_hidden_units = 24weights = tf.Variable(tf.truncated_normal([num_hidden_units, num_classes]))biases = tf.Variable(tf.truncated_normal([num_classes])) ...