We have to create demand model.
The first part is specifying the model architecture.
This time we are going to have four convolutional layers coupled with four pulling lives.
So if you look at this architecture, first is a convolutional layer with 32 Priddis, then there is
a max pooling layer with a two by two gunmen.
That is, it will reduce the size of image by half in both dimensions.
So overall, the number of pixels will be one foot in this resulting image.
Then there is a convolutional to deliver.
Then there is a max pooling layer.
Then again, a conditioner.
Then a max pooling there.
And the fourth congressional with a match.
You can also notice that the number of printers are increasing.
We first find out 32 features.
Then in the next list, we have 60 plus features.
After that, we have 128 and 128.
So it is a common practice in convolutional neural networks to increase the number of features that
you are taking out from the model.
So you will often see a structure like this with increasing feature maps.
Ask what?
Deep, willingly.
You can see that often each pulling list, the number of says we keep on reducing.
So in the initial image, we have 150 by 150.
When you apply a pulling layer, we will be left with 75 by 75 dimension feature layered up the second
Pullinger.
It will be 37 by 37.
No ourselves.
But we really are the third pulling that a really further reduce by half and up to deport putting there.
You can see that we'll have very few cells, but each of these cells will then give their output, which
will be flattened.
So we have a flat and left.
And this left will give the output to a normal multi-level Perceptron with phosphate and that which
has 500 neurons and one output neuron with the activation function sigmoid.
When we have fashion amnesty to say we used softmax function because there were multiple classes.
Now, since we have only two classes, we can use sigmoid activation function to our degan unless we
are using RELU using function.
So this is the structure of our model, the state, to create the structure.
You can run this model, come on, look at how many layers do you have in this deep checkbook?
So one convolutional, then one max pooling the convolutional and the max pooling and so on.
Overall, there are three point four million parameters to be trained.
The next step is to compile a model.
When we are compiling the model, there are two mandatory parameters.
Manistee lost function that we have to use.
Earlier we used sparse, categorical cross entropy.
This time we are going to use binary cross and repeat because there are only two classes.
We have also to optimize it using Artemus prop, optimize it this time with a learning radio 10 to the
pilot minus put.
We have done this because we know that orders prop gives a better result than its duty in a military
commission type of problems.
Will see often automats prop or Adam optimize it being used instead of a Judi's for such problems.
However, as a Lennert, I would suggest that you also try to run with SDD once and with automats prop
once and look at the defense.
Indeed, learning time that it takes and the accuracy that is duty gives vs. Artemus problems.
So try out both of these items.
Prop will clearly stand out, which is why we are going to use automats prop optimizer Distin.
Thirdly, we want to look at the accuracy.
So we have specified that metrics to be monitored.
Is accuracy to be underscored?
And that model is combined.