Now, the structure of our model is ready.
We have to compile the model in compiling.
We have to tell two things to the model.
One is the optimizer.
And the other is loss.
The model optimize it for this problem is going to be as Didi's.
Which stands for stochastic gradient descent.
The lost function is sparse, categorical cross and droopy.
This is as before.
I have told you that if we have more than two classes, an observation can belong to only one class.
So, for example, in our dataset there are ten classes of 10 fashion objects and observation can belong
to only one of those things.
It can be either short or good or any good.
So sense of division can belong to only one class.
We have to use sparse, categorical, coarse and droopy.
The other options are listed here.
So I'm compiling them all.
We'll be monitoring the accuracy metrics since we are solving a classification problem.
Now comes the last part that is training the model.
We train the model using fit function, fit function takes in several parameters.
The first two parameters are the training images and training labels using which the model is to be
trained.
So that is part train images and part train labels.
Second parameter is number of epochs.
This is the number of times the entire dataset will be fed into our model.
I will suggest that we use callbacks and use only stopping callback instead of straightaway running
this forward today box.
But for now, I'm going to use epoch value of 30
years at a bad table 64.
So in stochastic gradient descent, the observations will go in as a batch of 60 for.
And we have also listed the validation data so that we can see the validation accuracy on the train
model also.
So then I have this line of code to start training the model for today box.
It may take 10 to 15 minutes for this.
So I'll pause the video here and skip right to that point of time where my model Listerine.