Hey.
No, let's talk about stride stride as a parameter that allows us to define how we move or convolution
filter.
So stride is basically our step size stride defines how many steps we take when we're sliding our convolution
convolution window across the image.
So let's take a look at that.
So remember just the convolutions we did previously?
That was the straight of one.
And let's take a look at what it looks like.
You see the moves by one Pixel two to the right.
Then once again, then one down one right one right.
One down one right one, right.
The key key point to the key would to know there was one.
It is just one pixel at a time.
No.
What about Australia, too?
Let's take a look and see what that looks like.
So let's start us off.
If we jump to, it's going to move to there.
Let's go back and take a look at it again.
You can see it skip snow two points.
So instead of this blue something here, the blue starts here just like that.
And similarly, when you're going down, it goes down two points as well.
Take a look at it.
So now they're only four points or four available movements when using a straight of two.
What does that mean?
Well, if you were paying attention, you may have noticed that the feature map or the output size has
gotten smaller.
It's now two by two.
When previously, let's take a look.
It was a tree by tree.
So what it means now is that by making larger strides we get, we're actually reducing the size of defeat
him upward.
But the output feature map, so do some observations to note with Strider, a larger stride produces
a smaller feature map.
Like we just said, larger stride has less overlap to less overlap, meaning that because of the jumps,
it's not using the same pixel information twice, so it has less overlap in that sense.
So we do use straight to control the feature map output.
And why is that important?
Well, you may not know this yet because you're just starting your journey on convolutional neural nets,
but big networks work very well.
However, they are quite slow to train.
Training them leads to a lot of problems as well because it gets too complex and you have issues with
convergence.
So it's always good to try to get the best size, the optimized size and optimize performance, you
know, in one network that's too big.
Basically.
So we can no calculate the filter size, the arbitrary feature map size with this formula here, and
this formula now uses tried and putting in the formula.
So NBN is a limited size five by five f by f as a filter size tree by tree and plus two p p being padding.
And in this case, for use, a putting of zero and minus f minus F is a filter size here divided by
S.
I know it seems like a bit much right now, but it's quite simple.
This is the straight two plus one.
So let's take a look at this.
Moving on to here, when I substitute the values and we have five plus two by zero because putting a
zero minus tree over two, so that's simply two by two in the end, because this is this, it ends up
being two, because this entire numerator basically equals to want them to two sets two of a two plus
one.
And that's how we get the two of here.
Let's look at another example.
Let's change Australia to one.
So as you would expect, going back to the slide astride of two gives us a small feature map.
Two by two strata of one gives us a tree by tree, and you can plug into values in a formula here.
You can see that it works out to be tree by tree as well.
So that's pretty cool.
But what about if we were to use a putting of one?
Now let's plug into putting values into formula and see how it goes.
You remember previously it was two by zero.
Now it's two by one.
So we have five plus two, which is seven minus three, which is four four divided by one, which is
four again plus one, which is five, which gives us that five by five sites.
So you can see if we increase stride, we get smaller feature maps.
If we increase padding, we can get larger feature maps, so it's a balancing act.
Normally, I'll tell you if most neural networks we know CNN's, I should say we use the stride of one
and a putting of one.
You don't deviate too much from those sizes as well as filters tend to be tree by tree.
Five five five seven by seven nine by nine.
There was a standard size filters.
Typically, we don't go to much bigger than those.
And that's it for this lesson.
I hope you enjoyed this lesson.
And now we're going to move on to something called the activation layer.
And the activation function we're going to use is called the reel, which has proven to be the best
one for CNN's.
However, it's not the only one available.
So I'll see you in the next section.
Thank you.