All right, everyone.
So let's continue our discussion on spam detection with CNN.
So we are reaching their last video, tell this padding sequence on our input data.
And now we can grab this one variable, sort of very second value of this Sape of this data underscore
train if you're trying to paint it.
It will be one, it is nine, because later we are going to use it for the I mean, while doing this
padding sequence on the testing, like I say, so seemed like a training data set.
We are going to use it for the testing that does it.
But in case of testing that has it, we don't know the maximum length.
So we have just supplied the state and these netting what, the Lentol individual records.
Now let me run it.
And you can see we have our land 189 for tasting individual kozo soil and for training on so one eighty
nine.
Now, how many toadflax we have available so we can grab this information from over?
Or is it data from objects.
Let me display here.
If not shape.
So it will be five five.
Seventy two.
And while splitting this dataset we kept like a crediting percentage of data set.
We'll go into testing buckets.
So out of five five seven two data set.
Now we have a eighteen hundred thirty nine course in our testing buckets and three seven three three
records inside the training buckets.
And this training buckets we are going to use for building our modern right.
So now data is clear.
Next is we are going to build our first convolutional neural network model.
But before applying those convolution layer, first thing, we are going to apply Embling layer.
And how we are going to build this model.
So let me give the reference like.
Will create a model object from here.
So that will be a lot of of locate us and a model and how we are going to hide the layers inside.
So that will be a part of tensor flow.
Get us an alias.
Aldo's preprocessing velho earlier only QST.
All right.
So this way of creating model inside the cars that will be called as a functional V operating model.
That will be another V also creating models.
So we will see in the upcoming projects.
So first, let's create the input and.
Input will be key because every single record has been represented by this one eighty nine number.
That is nothing but three.
So that is that will become over input.
Next, we are going to.
And when I'm ready.
Clear.
So this is the value of writing.
Like when you add nuclear, you are just going to use the earlier Lear, like, let's say AISI will
become a bit earlier Lear.
So what is the diamonds and all this?
I'm reading.
What kind of output we are expecting.
So in case of I'm reading this V.
Let me tell you what is V very well defined.
So vs nothing but.
Total unique voice, because here, whatever the sequence we have created, that has been given one
number.
But now when we are building this building model, we have to assign specifically those particular index
politician.
So we are going to add one amazing layer where every single word will be represented.
So replacement, that is just because the next thing here starts from the one not with a zero output
will be these, because whatever the dimensional output we will get.
We want to represent over every single token to 20 dimensional space.
Let's write this amending letter will take care of all those things.
Next, let's have a first convolution layer.
And this type of pre layers we are going to add.
So in the first convolution layer, there are 32 convolution feature.
We will try to extract it.
And each of the feature having a total three values seem like a max pulling.
So out of three values, we will try to take maximum in the next convolution layer.
Sixty four feature each of the features of same size like a tree.
We'll try to extract it in the third convolution lea it seemed like earlier.
So that will be a one.
Twenty eight.
And then we'll just create a dense layer.
So dense layer having output only one.
And here you can see our activism will be a sigmoid.
So in all our earlier cars that we send, you need will be available.
So all those negative value will be suppressed and positive value will be passed on as it is.
Here.
We'll use the sigmoid.
Because we are dealing here with the classification problem.
And that is also binary classification problem.
So either it will be a zero or it will be at one.
So Hollowell layers got defined.
Next is we need to create a model.
So model requires one input.
And all of a layer.
So at the end of a layer will be X.
X is a function of this particular X.
So we layers we are just keep adding.
So this is the one of the V to build a model inside the US.
All right, so now you can see model guard defined next is we need to compile this, Martin.
So for compilers, indirectly, arguments we need to supply.
So when is Optimizer that how we are going to optimize your last function?
Our last function will be a binary cross, and because here we are dealing with the binary classification
problem and how you're going to measure that, how good your model is.
So for that, we are going to use this accuracy misery criteria.
So that will be a modern campaign.
And adding, we need to fit the model.
So here, the interesting or most moving parts, I would say will start like fitting your data.
Let me run it and all of an output will be tracked inside.
This are variable.
So only for the fire pork.
I'm going to run it.
And as a validation data, I am just going to supply this testing.
Does it.
And input data set will be training data set.
So that will be data on the screen.
In a wide discovery.
And you can see we just fine apple.
We got the validation accuracy cluster on ninety eight percent.
Is that that's a very good use.
And for any accuracy, it will be ninety nine point ninety two.
Let's try to display this thing in terms of check.
So here we are trying to display from this automatable.
So our history from there, we are going to get the loss and a values and lost.
So with respect to every single iteration now in our case, the accretion will be just fine.
So at each present and what is the loss and what is a relevation loss?
It will display.
So although the attrition level information will be stored in this are variable, and you can see with
respect to each iteration, the losses and reducing seem like a loss.
We can even display accuracy.
So let me run this one.
And you can see from zero to one, two, two.
Could I see invalidation as it is, keep on increasing.
All right.
So that is all about the how to implement this family, the extent of it convolution.
So see you the next video.