Welcome back.
We finished the model summary.
Now let's move to training the model.
Here we need to create a new variable called history equals to model fit.
And thanks for the AI in Colab that suggests some codes.
X y epoch 1000 and verbose equals to zero.
At first, let me explain what training the model involves.
We need to make predictions.
We need to calculate how wrong they are using MSE and updating weights to reduce errors using SGD.
The algorithm and repeating for many epochs.
Here we use model dot fit function.
The fit function is where your neural network discovers the pattern in your data.
Through repeated trial and error, gradually improving its predictions over 1000 passes.
Let me explain those parameters x and y x.
The feature, which is the house sizes and y is the target which is the house prices.
So those are the parameters x, y epochs and epochs, and a verbose so x.
The features house size targets house prices its shape 101.
Also its shape is 101 an array of 100 rows.
And the model learns the relationship price equals to F of size.
So here we need to model learns the relationship price equals to F of size.
So we need to find the relationship in terms of size and function of size between price and size okay.
Apex means pass.
One complete pass through all 100 training examples.
So one epoch equals to one complete pass through all 100 training examples.
1000 epochs.
The model sees the entire data set 1000 times each epoch the weight gets lighter, slightly better.
So as you increase the apex as your model, get trained and better.
Okay, so this is very important.
Note one epoch one complete pass through all 100 training examples okay.
Verbose equals to zero.
No progress output.
Silent training.
If I put it to one progress bar with metrics and two one line per epoch, I need to make it zero and
zero means no progress output.
Okay, so no progress output silent.
There is a very important note to understand what happens in every epoch.
Forward pass.
The first step.
Forward pass.
Make predictions for all houses.
Second step calculate loss.
How wrong we are.
We.
Third step backward pass.
Calculate gradients.
Fourth step update weights the SGD algorithm setup or step track progress.
Okay so every epoch those steps are being executed.
So we use fit function in order to discover the neural network.
Discover the pattern in your data through repeated trial and error, gradually improving its predictions
over the thousand epochs or past.