Learn Python
Learn Data Structure & Algorithm
Learn Numpy
Learn Pandas
Learn Matplotlib
Learn Seaborn
Learn Statistics
Learn Math
Learn MATLAB
Learn Machine learning
Learn Github
Learn OpenCV
Introduction
Setup
ANN
Working process ANN
Propagation
Bias parameter
Activation function
Loss function
Overfitting and Underfitting
Optimization function
Chain rule
Minima
Gradient problem
Weight initialization
Dropout
ANN Regression Exercise
ANN Classification Exercise
Hyper parameter tuning
CNN
CNN basics
Convolution
Padding
Pooling
Data argumentation
Flattening
Create Custom Dataset
Binary Classification Exercise
Multiclass Classification Exercise
Transfer learning
Transfer model Basic template
RNN
How RNN works
LSTM
Bidirectional RNN
Sequence to sequence
Attention model
Transformer model
Bag of words
Tokenization & Stop words
Stemming & Lemmatization
TF-IDF
N-Gram
Word embedding
Normalization
Pos tagging
Parser
semantic analysis
Regular expression
Learn MySQL
Learn MongoDB
Learn Web scraping
Learn Excel
Learn Power BI
Learn Tableau
Learn Docker
Learn Hadoop
Suppose we have a 4x4 image and we applied a 2x2 filter then we will get a 3x3 image according to convolution.
So applying max-pooling means applying another filter on our output that we get after applying convolution.
The reason for doing that is the filter we applied in convolution can detect the shape but it can not be
detect properly or clearly but if we use max-pooling we can detect the shape properly or clearly because we
are taking a high pixel value.
Suppose we get our output after convolution is:
1 | 2 | 3 |
---|---|---|
4 | 3 | 6 |
2 | 8 | 4 |
Now we will apply our 2x2 filter to our output. We will fit our max-pooling filter first-row and first-column
on the first-row and first-column of image layer, what we get after applying convolution and other cells of
filter will fit in order. Then we will find the max value of present inside the filter. After getting the max
value we will take it as our new output value and will put the value in the new matrix first-column first-row.
In convolution, after completing the calculation, we move the one step right but here we will move it
according to the max-pooling filter size. This means if our filter is 2x2 then we will move it 2 steps right
and if our filter is 3x3 then we will move it 3 steps right.
After moving the filter we will again find the max value. Our work is to find the max value and take it as
output and put it on our new image layer matrix. After completing the left side we will move to one step down
and fit the filter to the left side. It means now our filter should be on the image layer second-row
first-column and again have to do the same work. So this way max-pooling works.
Output after applying max pooling:
4 | 6 |
---|---|
8 | 4 |
The working procedure is same as max-pooling but the difference is in max-pooling we take max value. This means high pixel and in min-pooling, we take minimum value means low pixels.
The working procedure is the same as max-pooling but the difference is in max-pooling we take max value means
high pixel and in average-pooling, we take average value means average pixels.
How to find average:
If we have a 2x2 filter and if we apply it on the image layer then we will see 4 values are present in the
four-cell of the filter. So hare we will do average of those values to get the average value.
The working procedure is the same as max-pooling but the difference is in max-pooling we take max value means
high pixel and in sum pooling, we take sum of values present in the polling filter.
How to find sum:
If we have a 2x2 filter and if we apply it on the image layer then we will see 4 values are present in the
four-cells of the filter. So hare we have do those values sum to get the sum value.