1
00:00:00,900 --> 00:00:03,320
Now, the structure of our model is ready.

2
00:00:04,950 --> 00:00:08,940
We have to compile the model in compiling.

3
00:00:09,180 --> 00:00:11,640
We have to tell two things to the model.

4
00:00:11,970 --> 00:00:13,190
One is the optimizer.

5
00:00:13,380 --> 00:00:14,570
And the other is loss.

6
00:00:19,040 --> 00:00:23,600
The model optimize it for this problem is going to be as Didi's.

7
00:00:24,310 --> 00:00:26,470
Which stands for stochastic gradient descent.

8
00:00:27,690 --> 00:00:31,540
The lost function is sparse, categorical cross and droopy.

9
00:00:32,140 --> 00:00:33,260
This is as before.

10
00:00:34,180 --> 00:00:40,810
I have told you that if we have more than two classes, an observation can belong to only one class.

11
00:00:41,110 --> 00:00:48,880
So, for example, in our dataset there are ten classes of 10 fashion objects and observation can belong

12
00:00:48,880 --> 00:00:50,350
to only one of those things.

13
00:00:51,040 --> 00:00:53,870
It can be either short or good or any good.

14
00:00:55,330 --> 00:00:58,240
So sense of division can belong to only one class.

15
00:00:58,420 --> 00:01:01,120
We have to use sparse, categorical, coarse and droopy.

16
00:01:02,500 --> 00:01:03,910
The other options are listed here.

17
00:01:06,130 --> 00:01:07,430
So I'm compiling them all.

18
00:01:09,220 --> 00:01:13,600
We'll be monitoring the accuracy metrics since we are solving a classification problem.

19
00:01:16,540 --> 00:01:19,120
Now comes the last part that is training the model.

20
00:01:19,930 --> 00:01:27,560
We train the model using fit function, fit function takes in several parameters.

21
00:01:27,580 --> 00:01:35,320
The first two parameters are the training images and training labels using which the model is to be

22
00:01:35,320 --> 00:01:35,710
trained.

23
00:01:36,070 --> 00:01:39,970
So that is part train images and part train labels.

24
00:01:42,160 --> 00:01:44,340
Second parameter is number of epochs.

25
00:01:45,010 --> 00:01:49,030
This is the number of times the entire dataset will be fed into our model.

26
00:01:51,280 --> 00:01:59,330
I will suggest that we use callbacks and use only stopping callback instead of straightaway running

27
00:01:59,430 --> 00:02:00,730
this forward today box.

28
00:02:02,890 --> 00:02:06,880
But for now, I'm going to use epoch value of 30

29
00:02:09,460 --> 00:02:11,300
years at a bad table 64.

30
00:02:12,250 --> 00:02:18,310
So in stochastic gradient descent, the observations will go in as a batch of 60 for.

31
00:02:21,910 --> 00:02:28,050
And we have also listed the validation data so that we can see the validation accuracy on the train

32
00:02:28,050 --> 00:02:28,740
model also.

33
00:02:31,710 --> 00:02:37,140
So then I have this line of code to start training the model for today box.

34
00:02:37,740 --> 00:02:40,330
It may take 10 to 15 minutes for this.

35
00:02:41,250 --> 00:02:48,150
So I'll pause the video here and skip right to that point of time where my model Listerine.
