Pooling in Convolutional Neural Networks#
Overview#
Pooling is a crucial operation in Convolutional Neural Networks (CNNs) used to reduce the spatial dimensions of feature maps. This reduction helps decrease the number of parameters and computations in the network, thus mitigating the risk of overfitting and improving computational efficiency.

Types of Pooling#
Average Pooling#
Operation: Computes the average value of the elements within a pooling window.
Linear Operation: Because it computes a simple mean, it retains more information from the input feature map compared to max pooling.
Example:
The diagram shows a 2x2 average pooling operation, where each value in the output feature map is the average of the corresponding 2x2 region in the input feature map.
Max Pooling#
Operation: Computes the maximum value of the elements within a pooling window.
Non-linear Operation: By selecting the maximum value, it effectively retains the most prominent features and discards less important ones.
The diagram shows a 2x2 max pooling operation, where each value in the output feature map is the maximum of the corresponding 2x2 region in the input feature map.
Benefits of Pooling#
Dimensionality Reduction: Reduces the spatial dimensions of the feature maps, which lowers the number of parameters and computational cost.
Feature Extraction: Helps in retaining important features while discarding less significant information.
Invariant Representation: Makes the network more invariant to small translations and distortions in the input data.