1 00:00:01,110 --> 00:00:02,950 A lot of the gold will remain the same. 2 00:00:04,830 --> 00:00:14,190 The first step is to activate a library of guitars so it underscored you can check in packages that 3 00:00:14,190 --> 00:00:14,770 this is taped. 4 00:00:17,250 --> 00:00:19,500 Then we import our fashion amnesty data. 5 00:00:21,600 --> 00:00:29,190 Since fashion amnesty is an inbuilt dataset, this can be imported from the US library in the later 6 00:00:29,190 --> 00:00:29,990 part of the cause. 7 00:00:30,150 --> 00:00:34,740 We'll also learn how to import images and external data. 8 00:00:42,650 --> 00:00:48,740 So the data set is loaded and this variable faction amnesty, you can see that here is our dataset. 9 00:00:49,580 --> 00:00:52,430 We have discussed about this dataset in the previous section. 10 00:00:53,000 --> 00:00:54,860 I'll briefly tell you about this dataset. 11 00:00:55,820 --> 00:00:59,510 This dataset has two parts printed and tested. 12 00:01:00,440 --> 00:01:06,500 Trading has 60000 examples of twenty eight by twenty eight pixel images. 13 00:01:07,190 --> 00:01:08,840 All of these images are black and white. 14 00:01:09,770 --> 00:01:12,080 That is, these are grayscale images. 15 00:01:12,290 --> 00:01:21,950 Only one Daniloff color in the vye variable or the variable to be predicted is a single erry and it 16 00:01:21,950 --> 00:01:23,570 has values from zero to nine. 17 00:01:24,230 --> 00:01:25,520 So there are 10 object. 18 00:01:26,270 --> 00:01:27,530 Zero represents one object. 19 00:01:27,560 --> 00:01:28,820 One represents one object. 20 00:01:29,030 --> 00:01:29,570 And so on. 21 00:01:29,720 --> 00:01:34,240 So there are 10 object which are represented by zero to nine digit. 22 00:01:36,080 --> 00:01:40,760 Similarly, in the test set, there are 10000 images of twenty eight by twenty eight pixels. 23 00:01:41,510 --> 00:01:44,870 And the output variable is the class of that image. 24 00:01:48,470 --> 00:01:51,060 First of all, we will segregate the two parts. 25 00:01:51,710 --> 00:02:00,260 So we will store the information of training and train images and train labels and stored information 26 00:02:00,260 --> 00:02:03,070 of testing and test images and these labels. 27 00:02:05,660 --> 00:02:10,970 So you can see here, test images contains the information of only the images. 28 00:02:12,380 --> 00:02:20,150 Best Labels contains the information of what is the class of the object of which that image is. 29 00:02:23,090 --> 00:02:32,660 We are also creating this array of class names because in the labels we have value 029 Those 029 are 30 00:02:32,750 --> 00:02:35,030 encoded in digits. 31 00:02:35,240 --> 00:02:40,730 These are the actual values or actual objects in that image. 32 00:02:41,510 --> 00:02:46,580 So if we see zero there, it actually means that there is a t shirt in that image. 33 00:02:48,140 --> 00:02:49,870 If we see one, it means a trouser. 34 00:02:50,810 --> 00:02:58,100 So later on, when we predict the object in the image, we like to see the name of that image also. 35 00:02:58,190 --> 00:03:02,120 So for that purpose, I've created this array of class names. 36 00:03:09,170 --> 00:03:11,030 All of this is similar to the previous one. 37 00:03:11,780 --> 00:03:18,590 There's nothing new we have done a lot to step also, which is processing the data in which we have 38 00:03:18,590 --> 00:03:22,920 divided all the pixel values by 250 feet to normalize them. 39 00:03:23,810 --> 00:03:27,410 Although the process of normalizing it is a little bit different. 40 00:03:28,070 --> 00:03:34,760 But since in these images, we have only pixel data, which is homogeneous data across all the rows 41 00:03:34,760 --> 00:03:35,330 and columns. 42 00:03:35,540 --> 00:03:40,040 So we can straightaway divide by 255 to get values between zero and one. 43 00:03:41,930 --> 00:03:46,840 So we are dividing the information by 255. 44 00:03:49,670 --> 00:03:52,550 Then we are creating a validation dataset also. 45 00:03:54,200 --> 00:03:56,750 So there are three datasets that we will have. 46 00:03:57,200 --> 00:04:00,200 One is the path train images. 47 00:04:00,470 --> 00:04:05,870 So it is a partition of training set which will be actually used to train the model. 48 00:04:07,430 --> 00:04:10,580 Then there will be a validation data set of validation. 49 00:04:10,580 --> 00:04:17,840 Data set is used to the only hybrid barometer's, although we will not be doing the type of parameters. 50 00:04:17,870 --> 00:04:21,500 As of now, CNN have a lot of hyper parameters. 51 00:04:22,550 --> 00:04:26,950 So when we try to tune them, a validation dataset is used here. 52 00:04:26,990 --> 00:04:29,120 I'm showing you how the user validation does it. 53 00:04:30,980 --> 00:04:34,820 And the third part will be dataset, which is already created. 54 00:04:35,030 --> 00:04:37,430 And it has 10000 observations. 55 00:04:39,440 --> 00:04:44,510 So in this part, we will be creating two partitions of the training data. 56 00:04:45,260 --> 00:04:52,730 First, 5000 will be stored in the validation take and the rest 55000 will be stored in the partition 57 00:04:53,030 --> 00:04:54,050 of training images. 58 00:05:01,510 --> 00:05:09,850 So now part brain images and part time labels is to be used for training the model value images and 59 00:05:09,850 --> 00:05:13,270 that labels will be used to look at the validation accuracy. 60 00:05:14,140 --> 00:05:20,530 And finally, we will check the accuracy on test images and test labels. 61 00:05:22,630 --> 00:05:30,430 So all this will same as before, but now comes the part where it is different from the previous model. 62 00:05:34,500 --> 00:05:42,540 So this first difference is the input that we are giving into our model, is it 28 by 28 pixel image? 63 00:05:44,730 --> 00:05:47,940 So there are two dimensions to each of the image. 64 00:05:48,650 --> 00:05:49,720 28 by 28. 65 00:05:50,460 --> 00:05:54,000 And we have a batch of 55000 images in our dining set. 66 00:05:54,300 --> 00:05:56,660 So that is the third dimension to our dataset. 67 00:05:58,890 --> 00:06:04,080 But at Convolutional, it takes an additional parameter of Jenelle's. 68 00:06:05,230 --> 00:06:06,690 So a grayscale image. 69 00:06:06,840 --> 00:06:09,310 As I told you earlier, has only one channel. 70 00:06:10,260 --> 00:06:15,900 If you had a RGV image that is a color image, then you'd have to specify three here. 71 00:06:17,100 --> 00:06:21,960 So there is an additional parameter of number of channels in the image. 72 00:06:23,490 --> 00:06:31,370 So since currently the structure of our images is three dimensional, 55000 by 28 by 28. 73 00:06:33,030 --> 00:06:38,970 I reship this Eddie and add one more dimension of the channels. 74 00:06:42,880 --> 00:06:50,250 This I have to do for all the trees dataset part training, images, validation, images and test images. 75 00:06:51,960 --> 00:06:54,360 I hope you understand why we have these here, these images. 76 00:06:55,470 --> 00:06:59,700 We need to include the information of the number of channels also. 77 00:07:02,490 --> 00:07:04,020 So this prepares our data. 78 00:07:04,890 --> 00:07:07,220 Now we have to start building our model.