So far, we have talked about the convolutional layer and the activation functions.
Now let's go and talk about the pulling layer.
Now, pooling is used in order to reduce the size of the result from the convolutional stuff we were
doing.
Convolution, we were getting a matrix.
Now, this mattress can be still large for further processing, especially if you have multiple layers
of convolution.
Well, in order to speed up processing, we will be using some pulling layer and this pulling lower
is going to choose the most distinct features in the extracted convolutional layer, and it is going
to create a separate feature for them.
Now let's see, how is that done?
Assume that this is my resolve from the convolutional layer and this is also my result after the activation
function.
OK, now the pulling layer is going to look like this.
How do we know that it looks like this?
What kind of operation is being done here?
Well, there is multiple algorithms, but the most famous one is called Max pulling by, Max pulling.
You take the maximum value between.
Now, the pulling has filters the same as Convolutional had filters.
Pulling also has filters and filters and the pulling, let's say a year or two by two.
OK, and this is a very realistic number when you are talking about pulling layer.
So you take a filter off two by two and you scan it over the image.
Now, what is the maximum value between these?
It's seven.
So you just try seven here.
So this is why it's called Mexico.
There is also something called average pulling, which is adding all of these numbers, dividing them
by the number of numbers.
In our case, we add four seven one six and we divide them by four and we get a new number that was
called average pulling.
In this case, we are using Max pulling, which is more famous now.
Let's say we are using astride of two.
What is a straight it's just the same size.
OK, so in Convolutional, they're moving this box here one by one that we go down one by one.
OK, that was a straight AF1.
Now you can also use a straight of to like here we have jumped not only one, we jumped Dhume.
Right.
We did not move this edge here, but we moved it here.
Right.
So this is a straight of two.
Now we take the max of this value, which is the 37.
We put the two.
OK, next we go down.
Well, actually, if this was a larger one, we would go down by two step because I just do so right
now we are taking the maximum value of here.
It's on the 52 and then we take the maximum value of zero to seven.
Now, what we did is we took the most distinct feature of that image and we are going to push it for
further processing.
Now, this will compress the image by keeping the most distinct features in it.
OK, is it guaranteed that it will do that?
No.
But while you are training it, you will reach an optimal value of where your pulling is getting the
right values, where you're pulling filter is going to extract the right feature.
OK, this is was about Max.
Now the next lecture.
We're going to get you to the last layer here, which is called the fully connected layer.