avatarCarla Martins

Summary

Pooling layers in Convolutional Neural Networks (CNN) are crucial for reducing spatial dimensions while maintaining important features, with max pooling, average pooling, and global pooling being the primary types.

Abstract

Pooling layers are a fundamental component of CNNs, designed to decrease the computational load by downsampling the spatial dimensions of feature maps. These layers are applied after convolutional layers and help in retaining critical features while reducing the dimensionality. The article outlines three main types of pooling: max pooling, which selects the highest value in a region to preserve the most significant feature; average pooling, which computes the average value to maintain the overall intensity of features; and global pooling, which considers the entire feature map for either max or average values to emphasize global context over spatial details. The author also provides a practical example of how pooling layers reduce feature map sizes and invites readers to engage with further learning resources on CNNs and machine learning.

Opinions

  • The author emphasizes the importance of pooling layers in CNNs for feature map compression and computational efficiency.
  • Max pooling is presented as the preferred method for retaining significant features due to its focus on the maximum activation within a region.
  • Global pooling is highlighted for its utility in scenarios where the overall context of the feature map is more relevant than the precise spatial arrangement of features.
  • The article suggests that increasing stride length in convolutional layers and applying pooling layers are effective strategies for compressing feature maps in CNNs.
  • The author encourages reader interaction by inviting suggestions for content addition and promoting their book on machine learning as a resource for further learning.

Pooling Layer Explained and its Importance in CNN

Photo by Google DeepMind on Unsplash

Pooling layers are used in CNN to reduce the spatial dimensions while still capturing the important features. The pooling layers are applied to the feature maps obtained from convolutional layers in order to reduce their dimensions. You can read more about CNN here and here:

https://readmedium.com/a-gentle-introduction-to-convolution-neural-networks-cnn-9455dfda49be
https://readmedium.com/going-deeper-with-cnn-understanding-layers-nodes-kernels-and-backpropagation-403d5d32f119

There are three main types of pooling layers:

(1) Max Pooling: Select the maximum value within the analyzed region (pooling window). By keeping the maximum activation it retains the most significant feature in each region.

(2) Average Pooling: As the name suggests, calculates the average value for each region. This approach is useful if we aim to preserve the general intensity of features rather than capturing specific details.

(3) Global Pooling: This can be global max pooling or global average pooling. With global pooling, the entire feature map is considered and reduced instead of its regions. It is useful when the global context is more important than spatial features.

We can compress a feature map in CNN by increasing the stride length in convolutional layers and/or by applying pooling layers.

The pooling layers operate with each individual feature map. So, if the previous convolutional layer has 98 kernels, and a feature map size of 32, the output will be 32x32x98. If we apply a pooling layer with a pooling window 3x3 and a fixed stride of the same size 3, the feature size will be:

Output = ((32–3)/3) + 1 = 11

So the final output size for the given pooling layer is 11x11x98.

Thank you for reading! Let me know if you have suggestions to add to this list, and don’t forget to subscribe to receive notifications about my future publications.

If: you liked this article, don’t forget to follow me and thus receive all updates about new publications.

Else If: you want to read more on topic, you can by my book “Data-Driven Decisions: A Practical Introduction to Machine Learning” that will give you all the information you need to start with Machine Learning. It will cost you only a coffee, and makes me a small tip!

Else: Thank you!

Artificial Intelligence
Math
Software Engineering
Machine Learning
Data Science
Recommended from ReadMedium