16.03.2021 Views

Advanced Deep Learning with Keras

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Deep Neural Networks

Everything else after the concatenate layer will remain the same as the previous

CNN model. That is Flatten-Dropout-Dense:

Figure 2.1.1: The Y-Network accepts the same input twice but processes the input in two branches

of convolutional networks. The outputs of the branches are combined using the concatenate layer.

The last layer prediction is going to be similar to the previous CNN example.

To improve the performance of the model in Listing 2.1.1, we can propose several

changes. Firstly, the branches of the Y-Network are doubling the number of filters

to compensate for the halving of the feature maps size after MaxPooling2D(). For

example, if the output of the first convolution is (28, 28, 32), after max pooling

the new shape is (14, 14, 32). The next convolution will have a filter size of 64

and output dimensions of (14, 14, 64).

[ 44 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!