1
00:00:00,780 --> 00:00:01,120
Hello.

2
00:00:01,140 --> 00:00:01,720
Welcome back.

3
00:00:02,640 --> 00:00:07,900
So what I'm gonna do is I'm going to create a new copy of our script so that we continue from there.

4
00:00:07,920 --> 00:00:14,970
I just clicked file save us for those of you who didn't see save us then I'm just going to append number

5
00:00:14,970 --> 00:00:16,210
two over here.

6
00:00:16,500 --> 00:00:16,900
Right.

7
00:00:16,920 --> 00:00:18,330
So we have the old one saved.

8
00:00:18,930 --> 00:00:25,160
Okay so what we're going to do is check out the um the dead dimension of our data set.

9
00:00:25,440 --> 00:00:29,160
And by doing this we'll be able to manipulate it efficiently.

10
00:00:29,160 --> 00:00:34,400
Often we make errors because we don't actually understand the the dimensions.

11
00:00:34,410 --> 00:00:35,950
It happens a lot in deplaning.

12
00:00:36,120 --> 00:00:40,800
So we have to take this bit very careful.

13
00:00:40,800 --> 00:00:48,000
So early on we said we had to save the image as a vector a column vector and pass it through the neural

14
00:00:48,000 --> 00:00:48,930
network.

15
00:00:48,930 --> 00:00:54,850
This is our image our image has a red channel a green channel and a blue channel.

16
00:00:55,140 --> 00:00:55,940
Right.

17
00:00:55,950 --> 00:01:03,890
So if the height of the image is sixty four and a with a sixty four then we have sixty four multiplied

18
00:01:03,900 --> 00:01:04,960
by sixty four.

19
00:01:05,040 --> 00:01:06,560
That is for a single channel.

20
00:01:06,630 --> 00:01:11,280
We multiply by three to get for the three channels.

21
00:01:11,280 --> 00:01:12,060
Right.

22
00:01:12,060 --> 00:01:14,040
So this is for a single image.

23
00:01:14,040 --> 00:01:16,100
So now we take this.

24
00:01:16,110 --> 00:01:16,530
Yeah.

25
00:01:16,550 --> 00:01:24,810
And then we multiply by the number of images because of this would end up with a comment this out because

26
00:01:24,810 --> 00:01:25,470
we've seen this

27
00:01:29,260 --> 00:01:33,780
or simply call this test point one.

28
00:01:33,780 --> 00:01:34,390
Sorry about that.

29
00:01:34,410 --> 00:01:38,240
Oh continue soon for your revision.

30
00:01:38,290 --> 00:01:42,410
Yeah right.

31
00:01:42,450 --> 00:01:50,510
So because of this what we end up with this our image transits or rig this guy here train sets or rig

32
00:01:50,520 --> 00:01:51,780
that dimension of this

33
00:01:54,590 --> 00:01:56,280
the dimension of this becomes

34
00:02:00,130 --> 00:02:01,860
height by with

35
00:02:07,420 --> 00:02:09,070
times three.

36
00:02:09,100 --> 00:02:15,400
This is for a single image height of the image times the width of the image height of the image sorry

37
00:02:15,430 --> 00:02:30,490
by the width of the image by three for a single image and then number of images for the entire set.

38
00:02:30,580 --> 00:02:38,990
So the number of images by the height by the width by three is the dimension of train sets X or reach.

39
00:02:39,570 --> 00:02:39,900
Right.

40
00:02:39,940 --> 00:02:45,670
So this the dimension this the number of images we know that for a single image we take its height with

41
00:02:45,790 --> 00:02:53,520
and then it three channels for the entire image we take all of this by this in a way that is it.

42
00:02:53,560 --> 00:02:59,400
So the height and weight the sense it's a square image the height and with is going to be the same.

43
00:02:59,440 --> 00:03:03,760
We're going to represent the height and weight by pixel number of pixel.

44
00:03:03,760 --> 00:03:11,830
So this very same thing we are going to write it like this we said we also we also mentioned that we

45
00:03:11,830 --> 00:03:16,320
represent training examples by the letter M and features by index.

46
00:03:16,450 --> 00:03:17,140
Right.

47
00:03:17,170 --> 00:03:19,220
So this is going to be rewritten.

48
00:03:19,270 --> 00:03:28,390
We are going to read writes this US M Train meaning training examples by num P X mean the number of

49
00:03:28,390 --> 00:03:35,500
pixels for the height and then num P X again number of pixels for the width since it's a square image

50
00:03:36,040 --> 00:03:37,410
by 3.

51
00:03:37,840 --> 00:03:47,230
So this is the dimension of train set X or rake and test sets X or Rick is the same dimension except

52
00:03:47,290 --> 00:03:50,920
now it becomes M test right.

53
00:03:51,070 --> 00:03:58,780
So after having said this let's continue I'm going to see M Train to get M Train we say m training course

54
00:03:59,860 --> 00:04:11,140
train sets or rig and then I'm gonna say shape index zero and I'm the reason I'm doing index 0 is because

55
00:04:11,230 --> 00:04:17,920
I want to extract the number of training examples remember 0 gives us the number of training examples

56
00:04:18,310 --> 00:04:26,710
1 give us height and then with and then OK 0 1 2 3 if I pass through here we will get a number of channels

57
00:04:26,970 --> 00:04:32,910
so because I want to extract number of training examples I say it what shape index zero and train.

58
00:04:33,080 --> 00:04:38,890
Okay okay I'm gonna say m test because

59
00:04:41,550 --> 00:04:42,210
test set

60
00:04:47,130 --> 00:04:54,440
X original dot shape index 0 right.

61
00:04:54,690 --> 00:05:00,440
Once that's done you see a number of pixels you cross

62
00:05:03,120 --> 00:05:06,240
we can actually yeah.

63
00:05:06,420 --> 00:05:07,450
Oh just.

64
00:05:08,280 --> 00:05:17,620
We can use the train set or takes it or test set Let's shape index 1.

65
00:05:18,210 --> 00:05:20,590
Right.

66
00:05:20,730 --> 00:05:29,760
So we we have this so we can come here and print the resort just to verify and then we can use print

67
00:05:29,760 --> 00:05:30,060
off

68
00:05:37,090 --> 00:05:39,390
mm mm mm mm mm mm mm.

69
00:05:39,700 --> 00:05:40,360
Oh just say

70
00:05:46,450 --> 00:05:57,160
no more offering examples and then I'll say plus string and all we have to do is pass M train over here

71
00:05:59,800 --> 00:06:12,280
and then copy this pasted over here number of test examples and then we have to pass em test over here

72
00:06:14,890 --> 00:06:20,140
and then next I can just paste this and say

73
00:06:25,980 --> 00:06:39,170
image height and with and over here we pass non p x like this we can also verify the shape of the entire

74
00:06:39,170 --> 00:06:42,290
training set so come over here and say print

75
00:06:49,330 --> 00:06:52,150
I would just copy this.

76
00:06:52,260 --> 00:06:55,460
Oh or just a train set shape.

77
00:06:59,080 --> 00:07:11,930
Well we want to do is come over here and then simply SDR and then we take the shape of X train or rig

78
00:07:13,030 --> 00:07:15,590
the train set X brake we take the shape

79
00:07:24,050 --> 00:07:28,520
there's the X we can do the same for the y

80
00:07:40,460 --> 00:07:41,440
that's what we have.

81
00:07:41,570 --> 00:07:44,380
And we can verify the test sets as well.

82
00:07:44,390 --> 00:07:45,050
Copy this

83
00:07:48,410 --> 00:07:49,380
piece over here

84
00:08:03,270 --> 00:08:04,740
and change this to test.

85
00:08:05,520 --> 00:08:06,150
Okay.

86
00:08:06,270 --> 00:08:08,430
Now let's see what we have control S2 safe.

87
00:08:08,460 --> 00:08:10,130
Click over here.

88
00:08:10,530 --> 00:08:11,280
Run module.

89
00:08:12,780 --> 00:08:15,740
Yeah but indentation is this what happened here

90
00:08:18,970 --> 00:08:21,450
controversy to save run module

91
00:08:24,200 --> 00:08:24,690
typo

92
00:08:29,100 --> 00:08:33,880
control has to save run module.

93
00:08:34,140 --> 00:08:39,870
Okay so number of training examples we have two hundred and nine training examples.

94
00:08:39,870 --> 00:08:47,310
Number of test examples we have 50 test examples image height and with 64.

95
00:08:47,360 --> 00:08:50,580
Our image is 64 by 64.

96
00:08:50,630 --> 00:08:52,600
We see over here.

97
00:08:53,070 --> 00:08:54,840
The shape of the train set.

98
00:08:54,840 --> 00:09:02,400
So this is number of images height with and then number of channels the shape of the training.

99
00:09:02,400 --> 00:09:03,790
Why.

100
00:09:03,870 --> 00:09:09,630
Because the shape of y is because we have two hundred and nine images then the shape of Y is going to

101
00:09:09,630 --> 00:09:12,020
be one by two hundred and nine.

102
00:09:12,090 --> 00:09:12,980
Right.

103
00:09:12,990 --> 00:09:20,880
And then the test set we have 50 images for test and then the Y is 50 of them we have 50 zeros and ones

104
00:09:21,960 --> 00:09:24,770
to to check what to cut or not cut.

105
00:09:24,810 --> 00:09:30,450
So this is how we check this out we check the dimensions of our data sets.

106
00:09:30,450 --> 00:09:34,380
If you have any questions just let me know and I'll see you in the next lesson.
