Maxpooling vs minpooling vs average pooling
Pooling is performed in neural networks to reduce variance and computation complexity. Many times, beginners blindly use a pooling method without knowing the reason for using it. Here is a comparison of three basic pooling methods that are widely used.
The three types of pooling operations are:
- Max pooling: The maximum pixel value of the batch is selected.
- Min pooling: The minimum pixel value of the batch is selected.
- Average pooling: The average value of all the pixels in the batch is selected.
The batch here means a group of pixels of size equal to the filter size which is decided based on the size of the image. In the following example, a filter of 9x9 is chosen. The output of the pooling method varies with the varying value of the filter size.
The operations are illustrated through the following figures.
We cannot say that a particular pooling method is better over others generally. The choice of pooling operation is made based on the data at hand. The average pooling method smooths out the image and hence the sharp features may not be identified when this pooling method is used.
Max pooling selects the brighter pixels from the image. It is useful when the background of the image is dark and we are interested in only the lighter pixels of the image. For example: in the MNIST dataset, the digits are represented in white color and the background is black. So, max pooling is used. Similarly, min pooling is used in the other way round.
The following figures illustrate the effects of pooling on two images with different content.
When classifying the MNIST digits dataset using CNN, max pooling is used because the background in these images is made black to reduce the computation cost.
Comments
Post a Comment