Hi and welcome to the lesson on how to train a CNN.
Now this section is just a high level overview of the training process, and we go into much greater
detail in the next upcoming sections.
So firstly, let's get started and try to understand what you thought of this learn because Okung filters
are basically the feature detectors that detect what's in the features that make up objects in an image
so that we can tell what's in the image.
So let's take a look at this.
Typically, we have the early layers of our CNN learning the low level features.
Those are things like edges.
You can see them here little lines or little blobs as well.
Colors that just edges edges or different angles, mostly.
So these are the features that the low-level consultants, Linda and Linda, detect.
Then we have the mid-level features.
Remember, we have consecutive layers of confidence.
And as those layers go on, they get typically bigger.
Well, those bigger filters allow us to learn more complicated patterns.
You can see the mid-level features.
They're a bit more detailed and you can see something that looks like an eye.
This one sort of looks like the corona virus, if I'm not mistaken.
These are all two lines, but this is a groups of lines, so you can see they're leaning more complex
patterns.
This one is like a mesh screen you can see here.
And then finally, this high level features those last filters before we reach the final out button,
fully connected layers.
They are able to detect a much more high level features.
So look at this one.
This is actually better.
You can see it here.
This one is like a honeycomb pattern.
This one looks like a branch tree branch.
So these are what of all converters, actually, Lynn?
It's a pretty cool visualization, isn't it?
So you can just go ahead and slide just basically just tells you where they are, just tells you what
I just talked about.
So what happens during a training process?
Well, firstly, remember all of the parameters that we have to learn all of those widths and biases.
Well, we initialize them in the beginning of the training process with random values.
So because that's the neural network, the CNN, at that point, it doesn't do anything.
It's just random values and what we do.
We just follow it propagate.
That means you just pass an image to it.
So we just operate the neural network convolutional neural nets on one image or a batch of images,
and we get the total error.
Total error means that we will get some output even from those random values after passing the image
in.
It's obviously going to be wrong in the beginning.
It's going to be random, but at least we can find a way to calculate the total error.
And by calculating the total error, we can use a technique called back propagation to update our gradients,
viability and descent.
And then we continuously do this process.
We propagate more images or a batch of images of data once again until all the images have been propagated
and all the images meaning all images in our dataset.
And that basically this described as one epoch.
And then lastly, we just keep doing more books, we keep doing this over and over.
That's why the training process for CNN or neural networks is so long because we keep having to pass
these images over and over and over into the new role that update the weeds.
It's a very computationally heavy desk, which is why we frequently use GPUs for this.
So let's illustrate this concept here.
These are images that we're going to input into.
We have a six or five or six, eight, eight and one.
Now imagine this is a CNN that has just been a randomly initialized with weird sort of random values.
So we input the that's the truth, and then we get the output here.
Now the output is going to be random values as well random probabilities.
Well, these are the probabilities.
Yet these are just the output.
Scores actually probably should have put probabilities here, but nevertheless, these are just random
unskilled, unsolved maxed scores and you can see it things to five.
Fortunately, that's a good sign, although actually thinks that too.
Sorry.
Not a good sign.
So we can just actually getting sort of five year plan to say sorry.
So, yeah, so then we input another image.
Let's take a look.
We input all the batches in this case here.
So after all, the image batches this image, each images have input.
These are the outputs here, and you can see these are two random outputs that we get from doing this.
Now, the point is of this is that we need to find a way to figure out how the neural network is is
performing based on the error we get here.
Remember, all of these are not going to be correct all the way because I didn't explain this to you
properly.
These here, these are the values scores that it thinks it is for each one.
So hopefully, you remember.
So let's take a look at something here.
Remember, I said, we need to learn from our results.
We need to find a way to quantify how correct our results were.
So going back to this slide, oops.
Sorry for the animations.
Yeah.
Going back to the slide, we need to find out that remember to give the highest score to the four of
the six being a five.
That's what this means is six means it read.
Put you use six as the input and the output score was high.
Score five.
That's wrong.
But we need to find a way to quantify how wrong that score is because the correct values point six.
So let's move on.
So, yes, as I said, we need to quantify how correct our results are and then we need to find a way
to tell the model to do better.
Now you may have remembered that way is true back propagation, which we'll get into shortly.
However, the first thing we need to do is create a loss function, and that loss function basically
is a measure of the error of produce from our neural network.
So that's where we stop now, and I'll talk about lost functions and the importance in the next section.
Thank you.