Deep Learning
In this topic, we will increase the number of layers of the neural network. You may remember that we can add hidden layers to our graph. We will target improving the accuracy of our model by experimenting with hidden layers.
Adding Layers
Recall the diagram of neural networks with two hidden layers:
Figure 7.12: Diagram showing two hidden layers in a neural network
We can add a second layer to the equation by duplicating the weights and biases and making sure that the dimensions of the TensorFlow variables match. Note that in the first model, we transformed 784 features into 10 labels.
In this model, we will transform 784 features into a specified number of outputs. We will then take these outputs and transform them into 10 labels.
Determining the node count of the added hidden layer is not exactly science. We will use a count of 200 in this example, as it is somewhere between the feature and label dimensions.
As we have two...