1 00:00:00,990 --> 00:00:01,950 We have to create demand model. 2 00:00:02,580 --> 00:00:05,780 The first part is specifying the model architecture. 3 00:00:07,320 --> 00:00:14,140 This time we are going to have four convolutional layers coupled with four pulling lives. 4 00:00:14,770 --> 00:00:22,170 So if you look at this architecture, first is a convolutional layer with 32 Priddis, then there is 5 00:00:22,170 --> 00:00:26,000 a max pooling layer with a two by two gunmen. 6 00:00:26,400 --> 00:00:31,650 That is, it will reduce the size of image by half in both dimensions. 7 00:00:32,010 --> 00:00:36,270 So overall, the number of pixels will be one foot in this resulting image. 8 00:00:38,580 --> 00:00:40,370 Then there is a convolutional to deliver. 9 00:00:42,270 --> 00:00:43,570 Then there is a max pooling layer. 10 00:00:44,700 --> 00:00:45,690 Then again, a conditioner. 11 00:00:46,050 --> 00:00:47,090 Then a max pooling there. 12 00:00:47,640 --> 00:00:49,490 And the fourth congressional with a match. 13 00:00:51,200 --> 00:00:54,720 You can also notice that the number of printers are increasing. 14 00:00:55,890 --> 00:00:57,700 We first find out 32 features. 15 00:00:58,650 --> 00:01:02,490 Then in the next list, we have 60 plus features. 16 00:01:03,960 --> 00:01:06,300 After that, we have 128 and 128. 17 00:01:07,410 --> 00:01:13,260 So it is a common practice in convolutional neural networks to increase the number of features that 18 00:01:13,260 --> 00:01:15,600 you are taking out from the model. 19 00:01:16,740 --> 00:01:21,720 So you will often see a structure like this with increasing feature maps. 20 00:01:23,630 --> 00:01:24,110 Ask what? 21 00:01:24,110 --> 00:01:24,730 Deep, willingly. 22 00:01:26,220 --> 00:01:33,480 You can see that often each pulling list, the number of says we keep on reducing. 23 00:01:34,680 --> 00:01:38,520 So in the initial image, we have 150 by 150. 24 00:01:39,480 --> 00:01:47,400 When you apply a pulling layer, we will be left with 75 by 75 dimension feature layered up the second 25 00:01:47,400 --> 00:01:47,910 Pullinger. 26 00:01:48,090 --> 00:01:49,860 It will be 37 by 37. 27 00:01:50,290 --> 00:01:50,900 No ourselves. 28 00:01:51,030 --> 00:01:59,230 But we really are the third pulling that a really further reduce by half and up to deport putting there. 29 00:01:59,970 --> 00:02:09,720 You can see that we'll have very few cells, but each of these cells will then give their output, which 30 00:02:09,720 --> 00:02:10,490 will be flattened. 31 00:02:11,370 --> 00:02:12,680 So we have a flat and left. 32 00:02:13,720 --> 00:02:21,660 And this left will give the output to a normal multi-level Perceptron with phosphate and that which 33 00:02:21,660 --> 00:02:28,650 has 500 neurons and one output neuron with the activation function sigmoid. 34 00:02:31,350 --> 00:02:37,410 When we have fashion amnesty to say we used softmax function because there were multiple classes. 35 00:02:38,550 --> 00:02:46,200 Now, since we have only two classes, we can use sigmoid activation function to our degan unless we 36 00:02:46,200 --> 00:02:48,330 are using RELU using function. 37 00:02:51,270 --> 00:02:56,520 So this is the structure of our model, the state, to create the structure. 38 00:03:01,040 --> 00:03:08,170 You can run this model, come on, look at how many layers do you have in this deep checkbook? 39 00:03:08,960 --> 00:03:14,300 So one convolutional, then one max pooling the convolutional and the max pooling and so on. 40 00:03:15,580 --> 00:03:20,050 Overall, there are three point four million parameters to be trained. 41 00:03:22,160 --> 00:03:23,960 The next step is to compile a model. 42 00:03:25,130 --> 00:03:28,580 When we are compiling the model, there are two mandatory parameters. 43 00:03:28,870 --> 00:03:30,980 Manistee lost function that we have to use. 44 00:03:32,580 --> 00:03:36,320 Earlier we used sparse, categorical cross entropy. 45 00:03:36,860 --> 00:03:40,640 This time we are going to use binary cross and repeat because there are only two classes. 46 00:03:42,500 --> 00:03:50,030 We have also to optimize it using Artemus prop, optimize it this time with a learning radio 10 to the 47 00:03:50,040 --> 00:03:51,000 pilot minus put. 48 00:03:53,510 --> 00:03:59,900 We have done this because we know that orders prop gives a better result than its duty in a military 49 00:03:59,900 --> 00:04:01,170 commission type of problems. 50 00:04:03,190 --> 00:04:10,200 Will see often automats prop or Adam optimize it being used instead of a Judi's for such problems. 51 00:04:12,240 --> 00:04:20,390 However, as a Lennert, I would suggest that you also try to run with SDD once and with automats prop 52 00:04:20,390 --> 00:04:24,030 once and look at the defense. 53 00:04:24,330 --> 00:04:30,470 Indeed, learning time that it takes and the accuracy that is duty gives vs. Artemus problems. 54 00:04:32,570 --> 00:04:36,000 So try out both of these items. 55 00:04:36,000 --> 00:04:41,730 Prop will clearly stand out, which is why we are going to use automats prop optimizer Distin. 56 00:04:45,700 --> 00:04:47,830 Thirdly, we want to look at the accuracy. 57 00:04:48,280 --> 00:04:51,400 So we have specified that metrics to be monitored. 58 00:04:51,580 --> 00:04:55,560 Is accuracy to be underscored? 59 00:04:56,620 --> 00:04:58,380 And that model is combined.