Pooling layer
After the convolution layer, we have the pooling layer. The pooling layer is used to reduce the dimensions of the feature maps and keeps only necessary details so that the amount of computation can be reduced. For example, to identify whether there is a dog in the image, we don't want to understand at which location the dog is in the image, we just want the features of the dog. So, the pooling layer reduces spatial dimensions by keeping only the important features. There are different types of pooling operations. Max pooling is one of the most commonly used pooling operations where we just take the maximum value from the feature map within the window.
Max pooling with a 2 x 2 filter and a stride of 2 is shown as follows:
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access