But what the next step is to create architecture for our model.
We will be using almost the same architecture.
We will be using sequential guitars US A.
And we will be adding four con layer.
Will Assad would touch it for years.
Then 60 votes were lost.
Then for filters.
Then again 128 filters and after each of this on layer we will.
We are also applying willing layer and as always the activation function is that a loop for all these
layers.
And after that this time we are also playing global player.
So what this layer will do is it we deactivate 50 percent of neurons during each epoch.
It will randomly pick for people sent off our neurons and it will deactivate them and we will be creating
model with the remaining 50 percent off neuron during each poll.
So for each book we are deactivating randomly 50 percent of our total neuron.
We are using robot here because doubled is a very effective layer to avoid or operating in our more
than.
So this is of a model architecture now.
The next the surplus to come by for lost function we will be using binary cross entropy since we have
two different classes.
If you remember earlier in Amis we had 10 different classes and there we were using is spot's categorical
across entropy.
But here since we have under two classes we are using binary cross and property for optimize it.
We are using Artemus prop with learning rate of zero point zero zero one and since this is a classification
problem we are calculating accuracy metrics as well.
The next step is to create our model since we are taking our data from Green generator.
We have to use for the generator to fit our model.
So we'll be using model dot for generator.
Then green gender to this doesn't matter which will continuously generate data in the batches of 32
images and then here we are using these steps but epoch as hundred earlier in our last model we were
using a bed size of 21 steps.
But epoch as hundred because we only had 2000 images for training purposes but this time since we are
randomly generating images from this transformation we can use more than 2000 images as well.
This time we are using a bed size of potato and steps but epoch as hundred So overall in e.g. pork we
are feeding around three thousand two hundred images the number of epochs this time is hundred and similarly
we will use validation generator to get the validation data.
Now since we are running this four hundred epochs.
If you are using the system with less than 16 GDP of RAM and without any graphic card it may take up
to one and half to two overs to create this model.
That's what I have already green this model and I have the data of what a hundred epochs yet.
You can see that our validation accuracy is increasing with each book and at our own ninety two hundred
but we are getting the validation accuracy between 80 to 84 percent and a training accuracy of 84 85.
But say so if you compare in our last model we were getting a training accuracy of around 95 to 98 percent
and a significantly lower validation accuracy of our own 79 percent.
In this model we are getting almost the same validation and lower training accuracy overall it before
passing so you can see that with our image processing and creating dummy images we have created or fitting
in our more than
after running this.
You can save your model by model lots save method and lets us create this graph to see how our valuation
accuracy and training accuracy are changing with each epoch.
So this orange and red lines are for accuracy.
This orange line is for training accuracy and red line is for validation accuracy.
You can see here that the validation accuracy is more than 80 percent as well as the training accuracy
is also more than 80 percent and both are moving together.
So there are no evidence of what fitting in our model and this is still increasing.
So if you run it for say 40 or 50 more epochs the validation accuracy may reach around 85 86 percent
as well.
So that's all for this will do we see that by augmenting our initial dataset by applying shear rotation
we shift height shift and flips.
We can treat or what fitting in our data and we can get a higher validation accuracy from our model.
Thank you.