You will usually find pooling accompanying convolutional layers. Pooling is an idea that is intended to reduce the number of computations by reducing the dimensionality of the problem. We have a few pooling strategies available to us in Keras, but the most important and popular ones are the following two:
- AveragePooling2D
- MaxPooling2D
These also exist for other dimensions, such as 1D. However, in order to understand pooling, we can simply look at the example in the following diagram:
In the diagram, you can observe how max pooling would look at individual 2x2 squares moving two spaces at a time, which leads to a 2x2 result. The whole point of pooling is to find a smaller summary of the data in question. When it comes to neural networks, we often look at neurons that are excited the most, and so it makes sense to look at the maximum values as good representatives of larger portions of data. However, remember that you can also...