Now, let's take a look at defining or lost function and optimism.
Remember, these are integral components of your CNN training process.
Remember, we remember the lost function that we talked about cross entropy loss.
Well, remember what?
We even use loss for losses use as basically a unit metric measurement that allows the back propagation
to use that as an input so that we can actually calculate the weights we can back, propagate through
the network, calculate whether the weights need to be increased or decreased for all the nodes.
And that process, remember, is called the gradient optimizing optimization process.
And there wasn't where we use algorithms such as stochastic gradient descent.
And remember, we had a parameter lambda as a learning rate parameter which where we use it as zero
point zero zero one.
In this case, in this situation and we use a momentum, remember I recommended a value of zero point
nine.
This bracket shouldn't be the bracket of a value of zero point nine.
That's what we'll be using for momentum value.
So this is how we create a optimizer.
First, we import the optimized object here, so it's torched on Optim and we import it as optimal so
we can use it just like this in the code.
So we specify we want to use the S2 function, which is optimizer belonging to the optimal module or
object.
We use this network parameters here, thus specifying that that we created.
We're going to set the parameters to it.
Being with with this Study Optimizer specified a learning rate of momentum and you would have noticed
I skipped over this.
But this criterion here is just across entropy loss.
We just create this.
I will be using this later on in the code, which you will see shortly.
So that's about it for the optimization function.
Just to some bullet, you want to come this trees and power lines of code.
Now let's take a look at how we train on model.
This is one of the most important parts of the CNN so senior training process.
So I'll stop here for now, and I'll go over this section with you in detail in the next section.
Thank you.