It is widely known that deeper networks can offer good performance in classification tasks (Liao, Q., et al. (2018)). In this section, we want to build a deep dense neural network and see how it performs in the CIFAR-10 dataset. We will be building the model shown in the following figure:
One of the aims of this model is to have the same number of neural units as the model in Figure 11.1, for the wide network. This model has a bottleneck architecture, where the number of neurons decreases as the network gets deeper. This can be coded programmatically using the Keras functional approach, as we discuss next.
Building and training the model
One interesting fact about Keras' functional approach is that we can recycle variable names as we build the model and that we can even build a model using a loop. For example, let's say that I would like to create dense layers with dropout...