Machine Learning Projects for Mobile Applications
上QQ阅读APP看书,第一时间看更新

Pooling layer

Another process that makes processing capability efficient is called pooling. In the pooling layer, larger images are pushed to shrink in size while keeping the information in them. This is done by sliding a window across the image and taking the maximum value in each window. In a typical pooling layer, a window of 2 or 3 pixels works on a side, but taking steps of 2 pixels also works:

After the pooling layer, the image size will be reduced by one quarter of what it was. This maintains the maximum value from each window. It also preserves the best feature inside every window. This step means that it doesn't care whether the feature fits or not, as long as it fits somewhere inside the window. With the help of this layer, CNN can identify whether a feature exists inside an image, instead of worrying about where it is. In this way, computers need not worry about being literal.

By the end of this layer, bringing down the size of an image from 10 megapixels to 2 megapixels will definitely help us to compute the capability of further processing faster.