Now what we need to do is to define the optimizing or optimizers, the optimizing scheme or method.
And in order to do that, we well, first we have to do something we didn't do before, which is assigning
the, the, the, the data to a device to self dot.
Self dot x two device.
And here we're going to do it again and again.
The first one is, well, the whole X, which is the location in in x and time.
And then white train.
And.
A xtrain.
All has to go to the device and regarding x also self dot x it will require.
Requires.
Gradient.
So which is important for our training process.
So of course Y and X will not require gradient because simply they are data, they are data points.
So.
Here.
We we already finished regarding to assigning these variables to the devices and now let's do the optimizer
thing.
So here is the optimization.
Or the miser sitting like whatever you can call it.
And we start by self dot.
Adam.
Equals torch dot optim.
Dot.
Adam.
And self dot model dot parameters.
So these are the first optimizer, which is Adam.
The second optimizer is, well, self optimal.
Miser we call it and torch dot.
Optym.
Dot LP.
Efg's.
And basically this optimizer is what we will do is we start with Adam, we start to optimize the whole
network.
Rough optimization of the network.
And after Adam, we are going to be quite exact regarding like to, to tweak these weights to get an
more accurate number.
So this is what we usually use and this is also the optimizer that is also this kind of optimizer is.
It's like it's good for short or limited memory.
So this is what we usually going to use.
And it's called a Broyden Fletcher Gold for channel.
So this is the A this type of optimizer.
And then we have to pass some basically parameters or like some.
Values to this optimizer.
Think it's better just to put it here?
So the first one is we need the parameters.
I think we have to put it here this way.
And again, here we put the same parameters and then we put the learning rate.
Why it might move.
Learning rate equals one.
And.
It should.
I don't want it like this.
I want.
Yeah, this one.
This is no problem.
So learning rate is is is one and maximum.
Iteration.
Iteration, well, equals 50,000.
And.
Maximum.
These are just values that you need to consider when some parameters that has to be set for this.
Optimizer.
History.
Size is going to be 50.
Tolerance.
Great equals one e to the power E7.
Rinse.
Change equals.
This is also a syntax and.
Dot.
Find.
Float.
Not apes.
And the line search.
If in.
Strong Wolf.
Wolf.
I think that's it for this one.
I hear we should put like this.
Okay, so we start Adam, we optimize with Adam and then we use LPF as Optimizer.
We have it will have many parameters.
We have to search what is these parameters and then change it based on whatever it is and of course
based on the results we have.