So far, our neural network architecture only has one hidden layer. In this section, we will contrast the performance of models where there are two hidden layers and no hidden layer (with no hidden layer being a logistic regression).
A model with two layers within a network can be built as follows (note that we have kept the number of units in the second hidden layer set to 1,000). The modified get_model function (from the code in the Batch size of 32 section), where there are two hidden layers, is as follows:
The following code is available as Impact_of_building_a_deeper_neural_network.ipynb in the Chapter03 folder of this book's GitHub repository - https://tinyurl.com/mcvp-packt . Note that we are not providing all the steps for brevity and that only the steps where there is a change from the code we went through in the Batch size of 32 section will be discussed in the following code. We encourage you to refer to the notebooks in this book's...