1 00:00:00,890 --> 00:00:08,520 But what the next step is to create architecture for our model, we will be using almost the same architecture. 2 00:00:09,120 --> 00:00:11,890 We will be using sequential as they appear. 3 00:00:12,360 --> 00:00:15,630 And we will be adding four on layer. 4 00:00:15,930 --> 00:00:17,980 We will start with 32 filters. 5 00:00:18,240 --> 00:00:19,740 Then 64 filters. 6 00:00:19,920 --> 00:00:21,480 Then 128 filters. 7 00:00:21,810 --> 00:00:23,880 Then again, 128 filters. 8 00:00:25,780 --> 00:00:28,660 And after each of this con led, we will. 9 00:00:29,080 --> 00:00:31,080 We are also playing with willingly. 10 00:00:33,370 --> 00:00:37,840 And as always, the activation function is the RELU for all these layers. 11 00:00:39,430 --> 00:00:43,630 And after that, this thing, we are also playing Grop Otilia. 12 00:00:46,080 --> 00:00:55,650 So what this lawyer will do is it will deactivate 50 percent off neurons during each epoch. 13 00:00:56,490 --> 00:01:01,170 It will randomly pick for people sent off our neurons and it pretty directly with them. 14 00:01:01,770 --> 00:01:08,190 And we will be training model with the remaining 50 percent off neurons during each people. 15 00:01:08,910 --> 00:01:15,860 So for each epoch, we are activating randomly 50 percent of our total neurons. 16 00:01:17,720 --> 00:01:24,780 We are using Grabbled here because Rubbled is a very effective leader to avoid overfitting in our more 17 00:01:24,780 --> 00:01:24,990 than. 18 00:01:28,290 --> 00:01:30,710 So this is of a modern architecture. 19 00:01:32,390 --> 00:01:34,670 Now, the next, the surplus to come by. 20 00:01:35,660 --> 00:01:38,650 For lost function, we will be using binary cross entropy. 21 00:01:39,050 --> 00:01:41,030 Since we have two different classes. 22 00:01:42,640 --> 00:01:50,860 If you remember earlier in Emmis, we had 10 different classes and there we were using spots categorical 23 00:01:51,250 --> 00:01:52,100 across entropy. 24 00:01:52,750 --> 00:01:59,040 But here, since we have one the two classes, we are using Leonetti, Cross and Groppi for optimize 25 00:01:59,050 --> 00:01:59,260 it. 26 00:01:59,410 --> 00:02:03,820 We are using Oremus prop with learning rate of zero point zero zero one. 27 00:02:05,120 --> 00:02:10,390 And since this is a classification problem, we are calculating accuracy metrics as well. 28 00:02:13,590 --> 00:02:16,140 The next step is to create our modern. 29 00:02:17,830 --> 00:02:26,390 Since we are taking our data from Katrina and Rita, we have to use for generator to fit our model. 30 00:02:26,530 --> 00:02:31,240 So we'll be using model dot for gender to Dan Crane, gender to. 31 00:02:32,270 --> 00:02:39,370 This dirty doesn't matter, which will continuously generate butat in the batches of 32 images. 32 00:02:41,120 --> 00:02:44,950 And then here we are using Insteps but Epoch as hundred. 33 00:02:46,970 --> 00:02:51,510 Earlier in our last model, we were using a bad size of 20 steps. 34 00:02:51,680 --> 00:02:57,120 But Epoch as hungry because we only had to pose an immediate. 35 00:02:57,140 --> 00:02:58,550 For training purposes. 36 00:02:59,420 --> 00:03:07,880 But this time, since we are randomly generating images from this transformation, we can use more than 37 00:03:08,160 --> 00:03:09,680 2000 images as well. 38 00:03:10,370 --> 00:03:16,060 This time we are using a bed size of potato and steps, but epoch as hundred. 39 00:03:16,770 --> 00:03:22,850 So overall, in each epoch we are feeding at all three thousand two hundred images. 40 00:03:25,270 --> 00:03:28,780 The number of epochs this time is hundred. 41 00:03:30,240 --> 00:03:36,450 And similarly, we will use validation generator to get the validation data. 42 00:03:39,090 --> 00:03:46,050 Now, since we are running this four hundred a box, if you are using this system with less than 16 43 00:03:46,050 --> 00:03:52,050 DGP of RAM and without any graphics card, it may take up to one and half to two or worse to create 44 00:03:52,050 --> 00:03:52,580 this model. 45 00:03:55,020 --> 00:04:01,980 That's what I have already train this model and I have the data off or one hundred epochs here. 46 00:04:04,230 --> 00:04:13,740 You can see that our validation accuracy is increasing with each book and at their own ninety two hundred 47 00:04:13,820 --> 00:04:14,110 book. 48 00:04:14,160 --> 00:04:20,340 We are getting the validation accuracy between 80 to 84 percent and. 49 00:04:21,440 --> 00:04:25,650 A training accuracy of it before a debate, but say. 50 00:04:26,940 --> 00:04:35,190 So if you compare in our last model, we were getting training accuracy of our own 95 to 98 percent 51 00:04:36,000 --> 00:04:41,140 and a significantly lower valuation accuracy of our own 79 percent. 52 00:04:42,690 --> 00:04:49,460 In this model, we are getting almost same regulation and lower training accuracy from it before person. 53 00:04:51,370 --> 00:05:00,070 So you can see that with what image processing and creating dummy images we have created or what fitting 54 00:05:00,160 --> 00:05:00,910 in our modern. 55 00:05:03,660 --> 00:05:11,220 After running this, you can save your model by model lot save method and lets us create this graph 56 00:05:12,150 --> 00:05:18,150 to see how our valuation, accuracy and training accuracy are changing with each epoch. 57 00:05:20,160 --> 00:05:23,280 So this orange and red lines are for accuracy. 58 00:05:24,240 --> 00:05:28,950 This orange line is for training accuracy and red line is for validation accuracy. 59 00:05:30,510 --> 00:05:36,600 You can see here that the validation accuracy is more than 80 percent as well as the training. 60 00:05:36,600 --> 00:05:38,760 Accuracy is also more than 80 percent. 61 00:05:40,320 --> 00:05:42,560 And both are moving together. 62 00:05:42,720 --> 00:05:45,420 So there are no evidence of overfitting. 63 00:05:45,660 --> 00:05:46,890 And then what model? 64 00:05:48,690 --> 00:05:50,670 And this is still increasing. 65 00:05:51,090 --> 00:06:00,930 So if you run it for, say, 40 or 50 more Reeboks, the validation accuracy may reach around 85, 86 66 00:06:00,930 --> 00:06:01,820 percent as well. 67 00:06:03,760 --> 00:06:05,230 So that's all for this review. 68 00:06:06,310 --> 00:06:14,620 v.C that by augmenting our initial dataset, by applying sheer rotation, will shift, hide, shift 69 00:06:15,120 --> 00:06:15,910 and flips. 70 00:06:16,480 --> 00:06:24,590 We can treat overfitting fitting in our data and we can get a higher valuation accuracy from our model. 71 00:06:25,180 --> 00:06:25,630 Thank you.