The last foundational concept we need to understand before we start building our CNN model in this sort,
it is that of a pooling leered.
And since you know how congressional leaders work, pulling labor is going to be easy to understand.
We use pulling that in our network to reduce the computational load, memory usage and the number of
parameters to be estimated.
Just like in Convolutional, let each neuron in appallingly, it also has a small, rectangular, receptive
field.
We have to define the size of this rectangular, receptive field.
Thus, trade departing day just like before.
However, pulling neurons have no weight.
All they do is aggregate the input using an aggregate function such as Max or mean in this image.
The layer on top is that of a pooling lid.
You can see that each neuron is looking at a two by two set of neurons on the lower layer.
The first neuron is looking at these four cells which have a dead body.
Next is looking at these four, which are dotted blue boundary.
This means that this right here is to.
By default, the strain in upwelling there is same as the vict or the receptively.
Now, if we use max function or max pooling, as it is called.
Only the maximum input value, although the four values in this receptive field makes it to the next
level.
The other three inputs are dropped.
For example, if these are defore output of these four cells, one, five, three, two, then although
these four, five is the largest value.
So this new dawn in the top layer will have five as outport.
So it is very simple.
No wait, no filters to be trained.
Just find the maximum value out of default values that it sees and it outputs that.
If you look at the DMV at the bottom.
If this is the feature map ad, which are Max pulling, Laird is looking at.
For the first squared off for.
Neurons.
The largest value is six.
So we ended six here in the first cell of the max pulling their.
Similar to Max pooling, that is average pulling, an average pulling.
We find out the mean of the values.
So if we are doing average pulling, it will be the average of these forward values, six, six, four
and five.
So that averages five point two five.
In the next raid, we look at the next forcefield and we find out their max and the average value.
Those are stored in the next year on.
Now, also notice that since we are using a straight off to hear.
The pulling lead has half of it and half the height of previously it.
You can now imagine how this will reduce the computations and memory usage.
Instead of pulling leered.
If we had the next convolutional lives straight away.
So that layer would have six endured six as eight and eight as well.
So six into it.
Forty eight input neurons.
So each new dawn in the next layer would have forty eight parameters to be trained.
But if we have this pulling it on top.
Then each neuron gets only three into four.
That is dwil input neurons.
So only 12 parameters but neuron are to be trained.
So instead of 48, we get to all.
I mean, just between the amount of computation goes down significantly.
So in this example, we saw that we can do both.
Max, bullying and mean pulling, but commonly Max pooling works better than the alternative options
because it highlights the main features instead of averaging them out.
So in our model, most often we'll be using Max, pulling only.
That's it.
This is the gauntlet behind Max pulling.
It is a trade.
We give away some extra information and we previously had to reduce the computational load on our system.
I will highlight this impact on competition when we write the good.