WEBVTT

00:00.080 --> 00:01.080
Welcome back.

00:01.120 --> 00:02.880
We finished the model summary.

00:02.920 --> 00:05.200
Now let's move to training the model.

00:05.240 --> 00:11.160
Here we need to create a new variable called history equals to model fit.

00:11.200 --> 00:17.800
And thanks for the AI in Colab that suggests some codes.

00:17.840 --> 00:23.800
X y epoch 1000 and verbose equals to zero.

00:23.840 --> 00:29.040
At first, let me explain what training the model involves.

00:29.120 --> 00:31.080
We need to make predictions.

00:31.360 --> 00:39.600
We need to calculate how wrong they are using MSE and updating weights to reduce errors using SGD.

00:39.640 --> 00:43.720
The algorithm and repeating for many epochs.

00:43.840 --> 00:47.200
Here we use model dot fit function.

00:47.240 --> 00:52.760
The fit function is where your neural network discovers the pattern in your data.

00:52.760 --> 01:00.800
Through repeated trial and error, gradually improving its predictions over 1000 passes.

01:00.890 --> 01:06.490
Let me explain those parameters x and y x.

01:06.530 --> 01:13.650
The feature, which is the house sizes and y is the target which is the house prices.

01:13.770 --> 01:21.090
So those are the parameters x, y epochs and epochs, and a verbose so x.

01:21.330 --> 01:28.250
The features house size targets house prices its shape 101.

01:28.290 --> 01:33.370
Also its shape is 101 an array of 100 rows.

01:33.370 --> 01:40.650
And the model learns the relationship price equals to F of size.

01:40.650 --> 01:50.730
So here we need to model learns the relationship price equals to F of size.

01:50.730 --> 01:58.850
So we need to find the relationship in terms of size and function of size between price and size okay.

01:59.090 --> 02:01.670
Apex means pass.

02:01.710 --> 02:06.670
One complete pass through all 100 training examples.

02:06.670 --> 02:14.390
So one epoch equals to one complete pass through all 100 training examples.

02:14.510 --> 02:16.790
1000 epochs.

02:16.910 --> 02:27.390
The model sees the entire data set 1000 times each epoch the weight gets lighter, slightly better.

02:27.390 --> 02:33.750
So as you increase the apex as your model, get trained and better.

02:33.790 --> 02:35.670
Okay, so this is very important.

02:35.710 --> 02:42.630
Note one epoch one complete pass through all 100 training examples okay.

02:42.790 --> 02:44.870
Verbose equals to zero.

02:44.910 --> 02:46.630
No progress output.

02:46.630 --> 02:48.470
Silent training.

02:48.470 --> 02:58.110
If I put it to one progress bar with metrics and two one line per epoch, I need to make it zero and

02:58.110 --> 03:01.600
zero means no progress output.

03:01.640 --> 03:04.520
Okay, so no progress output silent.

03:04.520 --> 03:09.760
There is a very important note to understand what happens in every epoch.

03:09.960 --> 03:11.400
Forward pass.

03:11.600 --> 03:12.280
The first step.

03:12.280 --> 03:13.120
Forward pass.

03:13.120 --> 03:15.560
Make predictions for all houses.

03:15.760 --> 03:17.960
Second step calculate loss.

03:17.960 --> 03:18.960
How wrong we are.

03:18.960 --> 03:19.280
We.

03:19.480 --> 03:22.200
Third step backward pass.

03:22.200 --> 03:23.840
Calculate gradients.

03:24.480 --> 03:31.960
Fourth step update weights the SGD algorithm setup or step track progress.

03:32.000 --> 03:37.840
Okay so every epoch those steps are being executed.

03:37.840 --> 03:44.000
So we use fit function in order to discover the neural network.

03:44.000 --> 03:51.960
Discover the pattern in your data through repeated trial and error, gradually improving its predictions

03:51.960 --> 03:55.760
over the thousand epochs or past.
