August 2018
Intermediate to advanced
438 pages
12h 3m
English
Let's improve upon our base CNN model by adding in one more convolution layer, another dense hidden layer. Besides this, we will add dropout of 0.3 after each hidden dense layer to enable regularization. We covered dropout briefly in Chapter 2, Deep Learning Essentials, so feel free to quickly skim through it in case you need a refresher. Basically, dropout is a powerful method of regularizing in deep neural nets. It can be applied separately to both input layers and the hidden layers.
Dropout randomly masks the outputs of a fraction of units from a layer by setting their output to zero (in our case, it is 30% of the units in our dense layers):
model = Sequential() # convolutional and pooling layers model.add(Conv2D(16, ...
Read now
Unlock full access