1
00:00:00,090 --> 00:00:00,350
Hey.

2
00:00:00,650 --> 00:00:07,110
No, let's talk about stride stride as a parameter that allows us to define how we move or convolution

3
00:00:07,260 --> 00:00:07,770
filter.

4
00:00:08,670 --> 00:00:16,950
So stride is basically our step size stride defines how many steps we take when we're sliding our convolution

5
00:00:17,310 --> 00:00:19,170
convolution window across the image.

6
00:00:19,560 --> 00:00:20,730
So let's take a look at that.

7
00:00:21,300 --> 00:00:25,560
So remember just the convolutions we did previously?

8
00:00:26,010 --> 00:00:27,310
That was the straight of one.

9
00:00:27,330 --> 00:00:28,920
And let's take a look at what it looks like.

10
00:00:29,370 --> 00:00:33,060
You see the moves by one Pixel two to the right.

11
00:00:33,570 --> 00:00:37,520
Then once again, then one down one right one right.

12
00:00:37,530 --> 00:00:39,840
One down one right one, right.

13
00:00:40,650 --> 00:00:43,830
The key key point to the key would to know there was one.

14
00:00:44,400 --> 00:00:46,620
It is just one pixel at a time.

15
00:00:47,220 --> 00:00:47,670
No.

16
00:00:47,970 --> 00:00:49,370
What about Australia, too?

17
00:00:49,440 --> 00:00:51,420
Let's take a look and see what that looks like.

18
00:00:52,410 --> 00:00:54,120
So let's start us off.

19
00:00:54,360 --> 00:00:57,110
If we jump to, it's going to move to there.

20
00:00:57,660 --> 00:00:59,160
Let's go back and take a look at it again.

21
00:00:59,580 --> 00:01:02,050
You can see it skip snow two points.

22
00:01:02,490 --> 00:01:07,170
So instead of this blue something here, the blue starts here just like that.

23
00:01:07,650 --> 00:01:11,490
And similarly, when you're going down, it goes down two points as well.

24
00:01:11,520 --> 00:01:12,300
Take a look at it.

25
00:01:13,170 --> 00:01:21,000
So now they're only four points or four available movements when using a straight of two.

26
00:01:21,600 --> 00:01:22,410
What does that mean?

27
00:01:22,650 --> 00:01:29,520
Well, if you were paying attention, you may have noticed that the feature map or the output size has

28
00:01:29,520 --> 00:01:30,420
gotten smaller.

29
00:01:30,450 --> 00:01:31,680
It's now two by two.

30
00:01:32,070 --> 00:01:33,960
When previously, let's take a look.

31
00:01:35,100 --> 00:01:36,720
It was a tree by tree.

32
00:01:37,080 --> 00:01:45,690
So what it means now is that by making larger strides we get, we're actually reducing the size of defeat

33
00:01:45,700 --> 00:01:46,290
him upward.

34
00:01:47,100 --> 00:01:54,330
But the output feature map, so do some observations to note with Strider, a larger stride produces

35
00:01:54,330 --> 00:01:55,320
a smaller feature map.

36
00:01:55,320 --> 00:02:02,430
Like we just said, larger stride has less overlap to less overlap, meaning that because of the jumps,

37
00:02:02,430 --> 00:02:08,070
it's not using the same pixel information twice, so it has less overlap in that sense.

38
00:02:08,580 --> 00:02:11,520
So we do use straight to control the feature map output.

39
00:02:11,970 --> 00:02:13,380
And why is that important?

40
00:02:13,410 --> 00:02:18,690
Well, you may not know this yet because you're just starting your journey on convolutional neural nets,

41
00:02:19,110 --> 00:02:22,650
but big networks work very well.

42
00:02:22,950 --> 00:02:25,130
However, they are quite slow to train.

43
00:02:25,680 --> 00:02:31,260
Training them leads to a lot of problems as well because it gets too complex and you have issues with

44
00:02:31,260 --> 00:02:31,980
convergence.

45
00:02:32,430 --> 00:02:38,430
So it's always good to try to get the best size, the optimized size and optimize performance, you

46
00:02:38,430 --> 00:02:39,980
know, in one network that's too big.

47
00:02:39,990 --> 00:02:40,530
Basically.

48
00:02:42,230 --> 00:02:50,030
So we can no calculate the filter size, the arbitrary feature map size with this formula here, and

49
00:02:50,030 --> 00:02:52,790
this formula now uses tried and putting in the formula.

50
00:02:53,270 --> 00:03:02,420
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.

51
00:03:02,900 --> 00:03:09,590
And in this case, for use, a putting of zero and minus f minus F is a filter size here divided by

52
00:03:09,590 --> 00:03:10,040
S.

53
00:03:10,160 --> 00:03:13,910
I know it seems like a bit much right now, but it's quite simple.

54
00:03:14,600 --> 00:03:17,600
This is the straight two plus one.

55
00:03:18,590 --> 00:03:19,610
So let's take a look at this.

56
00:03:20,210 --> 00:03:26,000
Moving on to here, when I substitute the values and we have five plus two by zero because putting a

57
00:03:26,000 --> 00:03:34,280
zero minus tree over two, so that's simply two by two in the end, because this is this, it ends up

58
00:03:34,280 --> 00:03:42,020
being two, because this entire numerator basically equals to want them to two sets two of a two plus

59
00:03:42,020 --> 00:03:42,410
one.

60
00:03:42,800 --> 00:03:44,210
And that's how we get the two of here.

61
00:03:44,960 --> 00:03:46,580
Let's look at another example.

62
00:03:47,190 --> 00:03:49,100
Let's change Australia to one.

63
00:03:49,820 --> 00:03:55,990
So as you would expect, going back to the slide astride of two gives us a small feature map.

64
00:03:56,000 --> 00:04:01,790
Two by two strata of one gives us a tree by tree, and you can plug into values in a formula here.

65
00:04:02,240 --> 00:04:05,240
You can see that it works out to be tree by tree as well.

66
00:04:06,050 --> 00:04:07,390
So that's pretty cool.

67
00:04:07,400 --> 00:04:10,940
But what about if we were to use a putting of one?

68
00:04:11,480 --> 00:04:14,310
Now let's plug into putting values into formula and see how it goes.

69
00:04:14,330 --> 00:04:16,880
You remember previously it was two by zero.

70
00:04:17,270 --> 00:04:18,290
Now it's two by one.

71
00:04:18,500 --> 00:04:25,940
So we have five plus two, which is seven minus three, which is four four divided by one, which is

72
00:04:25,940 --> 00:04:30,810
four again plus one, which is five, which gives us that five by five sites.

73
00:04:30,820 --> 00:04:36,080
So you can see if we increase stride, we get smaller feature maps.

74
00:04:36,500 --> 00:04:40,910
If we increase padding, we can get larger feature maps, so it's a balancing act.

75
00:04:41,660 --> 00:04:47,870
Normally, I'll tell you if most neural networks we know CNN's, I should say we use the stride of one

76
00:04:47,870 --> 00:04:48,810
and a putting of one.

77
00:04:49,280 --> 00:04:55,890
You don't deviate too much from those sizes as well as filters tend to be tree by tree.

78
00:04:55,910 --> 00:04:57,980
Five five five seven by seven nine by nine.

79
00:04:58,370 --> 00:04:59,990
There was a standard size filters.

80
00:04:59,990 --> 00:05:02,180
Typically, we don't go to much bigger than those.

81
00:05:02,780 --> 00:05:04,960
And that's it for this lesson.

82
00:05:05,000 --> 00:05:07,190
I hope you enjoyed this lesson.

83
00:05:07,190 --> 00:05:10,940
And now we're going to move on to something called the activation layer.

84
00:05:10,940 --> 00:05:15,770
And the activation function we're going to use is called the reel, which has proven to be the best

85
00:05:15,770 --> 00:05:16,970
one for CNN's.

86
00:05:17,300 --> 00:05:19,140
However, it's not the only one available.

87
00:05:19,610 --> 00:05:21,650
So I'll see you in the next section.

88
00:05:21,770 --> 00:05:22,250
Thank you.
