Skip to main content

Importance of pooling layer in CNN

I recently came across a bunch of question regarding pooling in CNN.

  1. Will removing the max pooling layer from the CNN architecture effect the accuracy?
  2. Is pooling necessary for convolutional neural network?
  3. What will happen if we remove pooling layers from the General CNN architecture?
  4. Does removing pooling layers from CNN will improve results? 

There are many other similar questions like these and this article will answers all those questions.

Photo by Thomas Tucker on Unsplash

So, firstly if you don't know what pooling is then you can go through this article, it will help you in understanding pooling deeply. And if you just want to know the answers to the above questions then continue with this article.

So, we know that pooling helps in reducing the dimension. But why we want to reduce the dimension?

The answer is to reduce the computational power required to train the model. If we don't reduce the dimension then our model will take very long or most probably our machine will fail to train the model.

Now, let's assume that you got lot of money to spend on getting all GPU TPU to fulfill the computational power required to train your model without reducing the dimensions. So, now will it improve your results? The answer is no. In fact it will worsen your results, Why? Because if you will use complete image without reducing dimension It will capture everything present in the image. For example take the below image of a cat. Now if you to train a model without pooling layer. The model will train on the complete image and it will capture everything which is present in the image along with the cat or in other words your model will also train on unnecessary features which have very little to no use which will result in a noisy model.

Pooling helps you to deal with this problem. It extracts the high level features present in the image and leave all the unnecessary information. This not only helps the model to capture high level features but it also helps in reducing the time taken to train the model as model will not train on the unnecessary features.

So the role of pooling layer in CNN is very important.

  • Pooling makes our model to train only on high level features.
  • Pooling helps CNN model to train faster and reduce training time.
  • Pooling helps in reducing the cost to train the model as it reduces the computational power required to train the model.
I hope you got all your answers. If you still have any question or confusion you are free to drop a comment. 
Watch this video for understanding pooling deeply.


Popular posts from this blog

Understanding mean Average Precision for Object Detection (with Python Code)

Photo by  Avel Chuklanov  on  Unsplash If you ever worked on object detection problem where you need to predict the bounding box coordinates of the objects, you may have come across the term mAP (mean average precision). mAP is a metric used for evaluating object detectors. As the name suggest it is the average of the AP. To understand mAP , first we need to understand what is precision, recall and IoU(Intersection over union). Almost everyone is familiar with first two terms, in case you don’t know these terms I am here to help you. Precision and Recall Precision: It tells us how accurate is our predictions or proportion of data points that our model says relevant are actually relevant. Formula for precision Recall: It is ability of a model to find all the data points of inte

Extract Captcha Text using CNN in Python(Captcha solver)

Photo by Janik Fischer on Unsplash Captcha solver or captcha text extraction is a process of extracting text from the captcha image. This can be done by using OCR (Optical character recognition) tools like ‘Tesseract’. But to understand Computer vision more deeply you can build your own custom captcha solver. So let’s see how you can build your own captcha solver with the help of openCV and keras. Building Captcha Solver In order to detect the text in the captcha we will build a CNN model trained on separate image of letters of the captcha. For building the model we need to separate out each letter image from the captcha and write it for training the model. After training our model we can pass

How to Scrape Soundcloud data using Selenium? (from scratch)

Photo by  ClĂ©ment H  on  Unsplash Hello there, if you are new to web scraping or want to learn how you can scrape data from websites using Selenium then this article is for you. In this article we are going to scrape data from SoundCloud but you can use this technique to scrape data from other websites also. Before we move further and jump into coding, let’s take a look at what is web scraping. If you already hold knowledge about scraping you can jump to the coding section. Web Scrapping (also termed Screen Scraping, Web Data Extraction, Web Harvesting etc.) is a technique employed to extract large amounts of data from websites whereby the data is extracted and saved to a local file in your computer or to a database in table (spreadsheet) format.  As mentioned in the topic of the article, we are going to use Selenium for scraping the data. In case if you don’t know what seleni