1
00:00:00,970 --> 00:00:02,530
To train the model.

2
00:00:03,040 --> 00:00:06,040
What we will do is we will.

3
00:00:07,200 --> 00:00:08,670
It's quite simple.

4
00:00:08,670 --> 00:00:10,710
Just let me just take some space here.

5
00:00:11,810 --> 00:00:14,840
And it will be modal equals.

6
00:00:16,530 --> 00:00:18,990
Dee dee dee dee dee.

7
00:00:19,020 --> 00:00:19,470
Sorry.

8
00:00:19,500 --> 00:00:23,250
Will deep dot model.

9
00:00:23,280 --> 00:00:24,030
Model.

10
00:00:24,630 --> 00:00:26,610
And we will pass two things.

11
00:00:26,610 --> 00:00:30,780
The first one is the data we have, which is this one.

12
00:00:33,210 --> 00:00:36,330
And the second thing we will pass is the neural network.

13
00:00:36,330 --> 00:00:37,440
So network.

14
00:00:42,480 --> 00:00:43,300
And that's it.

15
00:00:43,320 --> 00:00:44,280
This is the model.

16
00:00:44,550 --> 00:00:47,070
Now how to train it.

17
00:00:47,100 --> 00:00:49,650
We will do also the.

18
00:00:50,860 --> 00:00:52,360
Model dot.

19
00:00:53,790 --> 00:00:54,540
Compile.

20
00:00:55,930 --> 00:00:57,430
And we're using Adam.

21
00:00:59,500 --> 00:01:03,910
With with a learning rate of.

22
00:01:05,030 --> 00:01:07,040
E to the power minus three.

23
00:01:08,150 --> 00:01:11,900
And now we will compile it.

24
00:01:13,530 --> 00:01:17,210
And we will start the training soon.

25
00:01:17,220 --> 00:01:22,350
What we will do or let me start the training and then I will explain more history.

26
00:01:25,810 --> 00:01:27,880
His story.

27
00:01:29,370 --> 00:01:30,420
And train.

28
00:01:31,960 --> 00:01:36,460
State equals model dot train.

29
00:01:38,580 --> 00:01:42,870
Iterations equals 15.

30
00:01:43,680 --> 00:01:44,330
Thousand.

31
00:01:46,060 --> 00:01:46,790
And reasons.

32
00:01:46,810 --> 00:01:47,140
Yeah.

33
00:01:49,050 --> 00:01:50,230
Loss.

34
00:01:50,520 --> 00:01:53,580
His two seems okay and shift enter.

35
00:01:54,820 --> 00:01:59,770
So now the model is actually training and, um.

36
00:02:01,600 --> 00:02:02,590
We can see.

37
00:02:02,590 --> 00:02:04,270
It's like.

38
00:02:06,360 --> 00:02:11,220
But I think I wanted to print this thing.

39
00:02:12,680 --> 00:02:14,030
Okay, Just let me.

40
00:02:15,920 --> 00:02:16,430
Stop it.

41
00:02:16,490 --> 00:02:17,900
Think it didn't run the whole.

42
00:02:17,990 --> 00:02:19,370
Let's run it from the beginning.

43
00:02:20,580 --> 00:02:22,470
Why didn't he print these things?

44
00:02:22,470 --> 00:02:24,540
I think it we didn't shift into it.

45
00:02:29,550 --> 00:02:30,000
Yeah.

46
00:02:30,030 --> 00:02:30,360
Okay.

47
00:02:30,360 --> 00:02:31,310
Now we can see them.

48
00:02:31,320 --> 00:02:32,040
We didn't.

49
00:02:32,070 --> 00:02:34,170
We wrote them, but we didn't shift enter.

50
00:02:34,170 --> 00:02:41,790
We didn't put them inside the, the, the ram didn't upload it so input or the actually the, the whole

51
00:02:41,790 --> 00:02:42,210
thing.

52
00:02:42,330 --> 00:02:42,630
Yeah.

53
00:02:42,720 --> 00:02:43,350
Mainly the ram.

54
00:02:43,680 --> 00:02:49,590
So the input we have this is the actual input that goes just a little bit.

55
00:02:49,620 --> 00:02:52,860
We talk about this one the a.

56
00:02:54,600 --> 00:02:59,940
In this issue how to change the lambda function, because I think it's a little bit confusing.

57
00:03:00,060 --> 00:03:06,540
So we talked about we have an input array and we need to see the shape.

58
00:03:06,540 --> 00:03:12,870
The input array is simply going to be the boundary point or in the in case of initial condition, it

59
00:03:12,870 --> 00:03:21,480
will be the initial condition points and it will be given in many different time steps, of course.

60
00:03:21,570 --> 00:03:28,140
So input array will be 80 to 80 rows and two columns because we have.

61
00:03:29,880 --> 00:03:34,320
This one, which is basically zero and the time.

62
00:03:35,120 --> 00:03:35,900
And here.

63
00:03:35,900 --> 00:03:38,110
What if we do 0 to 1?

64
00:03:38,120 --> 00:03:39,910
It will print it this way.

65
00:03:39,920 --> 00:03:43,130
1001111 this way.

66
00:03:43,220 --> 00:03:46,520
And if we change this to.

67
00:03:47,150 --> 00:03:55,640
Well, we put it like if we didn't put 0 to 1, what will happen is like.

68
00:03:56,260 --> 00:04:03,760
If we put it this way, the shape will be only 80 and it will look like this array, which is this is

69
00:04:03,760 --> 00:04:04,840
not what we want.

70
00:04:05,170 --> 00:04:11,650
So we have to be careful about the the values that we need to consider.

71
00:04:12,960 --> 00:04:19,500
Anyway, it will continue to train and he passed two times, one for every boundary condition.

72
00:04:19,500 --> 00:04:21,960
So he passed first time and he passed second time.

73
00:04:21,960 --> 00:04:23,900
This is why he printed two times.

74
00:04:23,910 --> 00:04:27,810
And basically this is finished the training itself.

75
00:04:28,760 --> 00:04:31,130
The next step is going to be.

76
00:04:32,120 --> 00:04:34,160
Well, basically the.

77
00:04:35,830 --> 00:04:40,780
A the that we need to further improve the accuracy.

78
00:04:40,780 --> 00:04:43,600
So model dot compile.

79
00:04:44,790 --> 00:04:46,020
Compile.

80
00:04:47,350 --> 00:04:53,440
And we will use a slash bfgs.

81
00:04:54,470 --> 00:04:57,140
A B method, which is a method.

82
00:04:57,140 --> 00:04:58,610
It's a limited memory.

83
00:04:58,610 --> 00:05:01,250
Something it's it's it's related to.

84
00:05:01,280 --> 00:05:05,840
It will give us a good accuracy in, in in kind of limited memory.

85
00:05:05,960 --> 00:05:12,590
So we can of course, we can search about this, how it works more, but mainly we use it in pens for

86
00:05:12,590 --> 00:05:15,010
giving getting a better accuracy.

87
00:05:15,020 --> 00:05:17,420
It's not like Adam will not work.

88
00:05:17,450 --> 00:05:18,350
It will work.

89
00:05:18,350 --> 00:05:21,530
But this is a common practice to use this one.

90
00:05:21,950 --> 00:05:30,890
So model again train we need now we we we train again the model, but this time we will not define how

91
00:05:30,890 --> 00:05:37,340
many iterations it will until it will converge and then shift enter.

92
00:05:38,120 --> 00:05:43,880
So again, he's took the thing and he will now start the training.

93
00:05:44,850 --> 00:05:47,550
A after it will finish it.

94
00:05:47,580 --> 00:05:56,880
Hopefully in the next class we will see how these models, the results generated by this model and we

95
00:05:56,880 --> 00:05:59,730
will explain what's happening in these results.

96
00:05:59,730 --> 00:06:01,950
So see you in next class.
