1
00:00:00,500 --> 00:00:11,750
Now what we are going to do is to start the the major well class in which we will define the.

2
00:00:12,530 --> 00:00:18,170
Data even defined the loss, the loss method and even the function.

3
00:00:18,290 --> 00:00:24,170
But for now, what we need to do is start this class that will have everything.

4
00:00:24,170 --> 00:00:30,770
But what we will do is we will explain how to input the data.

5
00:00:30,770 --> 00:00:39,050
So we need to input the data, which is basically our the data is our boundary condition and the initial

6
00:00:39,050 --> 00:00:39,470
condition.

7
00:00:39,470 --> 00:00:45,380
So here we, I will start with class.

8
00:00:46,090 --> 00:00:49,180
And the class is called Net.

9
00:00:49,570 --> 00:00:58,150
And we first define the initial condition and it will have a self, self, self.

10
00:00:59,250 --> 00:01:00,690
And device.

11
00:01:01,400 --> 00:01:02,420
Will be.

12
00:01:05,280 --> 00:01:10,830
Torch dot device and the device will be cuda.

13
00:01:11,550 --> 00:01:13,530
Of course, if cuda exist.

14
00:01:13,650 --> 00:01:15,390
If torch.

15
00:01:17,000 --> 00:01:18,020
Dot cuda.

16
00:01:19,960 --> 00:01:20,950
Is.

17
00:01:22,440 --> 00:01:22,670
Uh.

18
00:01:24,160 --> 00:01:25,030
Valuable.

19
00:01:26,340 --> 00:01:27,060
Else.

20
00:01:28,460 --> 00:01:29,270
Well.

21
00:01:32,220 --> 00:01:36,870
And torch device will be.

22
00:01:40,070 --> 00:01:40,610
Sibiu.

23
00:01:43,540 --> 00:01:45,460
This is very common, of course.

24
00:01:45,460 --> 00:01:47,890
And with that.

25
00:01:51,050 --> 00:01:52,430
And divisive.

26
00:01:52,820 --> 00:01:53,470
Sorry.

27
00:01:57,400 --> 00:02:01,810
Here we basically define the computational.

28
00:02:04,290 --> 00:02:09,810
Network or the computational necessary Internet network, the device we need to calculate.

29
00:02:10,140 --> 00:02:14,070
Either it's going to be the GPU or it's going to be the CPU.

30
00:02:14,070 --> 00:02:21,510
In my case, I have a well GPU and I have everything is set up regarding cuda, so I will use GPU.

31
00:02:21,630 --> 00:02:24,240
But of course you can use CPU as well.

32
00:02:24,900 --> 00:02:26,700
And this model is not so big.

33
00:02:26,700 --> 00:02:32,700
And of course, our model, our our also network is not so not the network is not big.

34
00:02:32,700 --> 00:02:37,140
The actual problem, the points we need to calculate is also not so big.

35
00:02:37,140 --> 00:02:46,560
So I would say it will be like no problem regarding the use of cuda so you can use it.

36
00:02:46,560 --> 00:02:47,470
The cpu.

37
00:02:47,490 --> 00:02:48,870
So here self.

38
00:02:49,560 --> 00:02:51,720
We start by defining.

39
00:02:51,930 --> 00:02:53,580
Well, basically the.

40
00:02:55,330 --> 00:02:57,250
The computational domain.

41
00:02:57,400 --> 00:03:05,170
So we have X, which is we will have starting with a wave.

42
00:03:05,200 --> 00:03:09,790
So after this x, what we will do is we will.

43
00:03:11,960 --> 00:03:21,500
Basically from X, we have to also define the temperature, the time, and based on that, we will calculate

44
00:03:21,500 --> 00:03:27,260
the other like we will fill the U.

45
00:03:27,260 --> 00:03:29,030
That will be calculated.

46
00:03:29,030 --> 00:03:31,940
So first let's define something like mesh.

47
00:03:31,940 --> 00:03:36,560
Although the neural networks, we don't really need mesh.

48
00:03:36,640 --> 00:03:45,140
It's not the way the way we do this computation is not similar to our traditional way, so it's kind

49
00:03:45,140 --> 00:03:45,710
of meshless.

50
00:03:45,710 --> 00:03:53,060
But while computing using mesh is kind of easy to define, so we will do it.

51
00:03:53,270 --> 00:03:59,960
So here self H equals 0.1, which is the step size of.

52
00:04:02,440 --> 00:04:09,730
The step size of of x and K is the step size of t x equals.

53
00:04:10,440 --> 00:04:11,490
Torch.

54
00:04:12,310 --> 00:04:14,680
Dot range.

55
00:04:16,390 --> 00:04:21,520
From -1 to 1 plus self dot.

56
00:04:24,530 --> 00:04:27,160
And step size is self dot etch.

57
00:04:27,170 --> 00:04:32,120
We do the same but this time with t so t.

58
00:04:35,120 --> 00:04:36,140
And self-worth came.

59
00:04:37,310 --> 00:04:38,850
And self taught care.

60
00:04:39,750 --> 00:04:42,450
So how this things work?

61
00:04:42,450 --> 00:04:49,080
Well, first, let's let's define also the whole grid and here self dot x.

62
00:04:50,340 --> 00:04:53,340
Equals torch dot.

63
00:04:54,630 --> 00:04:55,650
Stack.

64
00:04:57,030 --> 00:04:57,930
Torch.

65
00:04:58,680 --> 00:04:59,270
Dot.

66
00:05:01,130 --> 00:05:02,630
Meshgrid.

67
00:05:03,850 --> 00:05:05,590
X and T.

68
00:05:05,920 --> 00:05:08,260
This has to be reshaped.

69
00:05:08,620 --> 00:05:09,820
Reshape.

70
00:05:10,650 --> 00:05:15,630
Two and minus one and it will be transposed.

71
00:05:16,670 --> 00:05:17,720
What does it mean?

72
00:05:17,840 --> 00:05:21,500
Let's let's let's start doing all of this.

73
00:05:21,920 --> 00:05:28,970
So basically, what we will do is let's consider it first these two.

74
00:05:37,080 --> 00:05:39,330
Or maybe this one is not needed.

75
00:05:39,360 --> 00:05:46,320
So x underscore test and T underscore.

76
00:05:47,290 --> 00:05:48,100
And test.

77
00:05:48,640 --> 00:05:50,650
And we want to print.

78
00:05:52,050 --> 00:05:53,310
And exist.

79
00:05:53,550 --> 00:05:54,990
And, of course.

80
00:05:55,950 --> 00:05:57,420
Print test.

81
00:05:59,250 --> 00:06:01,140
And see how these things change.

82
00:06:01,140 --> 00:06:04,200
So here we consider 0.1.

83
00:06:04,880 --> 00:06:06,020
And then here.

84
00:06:06,050 --> 00:06:07,130
0.1.

85
00:06:09,620 --> 00:06:10,340
And one.

86
00:06:11,640 --> 00:06:13,650
SIM goes here.

87
00:06:15,650 --> 00:06:20,870
With actually we have the time cannot be negative, so it has to be zero.

88
00:06:22,090 --> 00:06:22,720
This has to be.

89
00:06:24,870 --> 00:06:27,420
So this is how it works.

90
00:06:27,450 --> 00:06:37,530
You have the the torch that will is going to be from a -1 to 1 with a step size of 0.1.

91
00:06:37,530 --> 00:06:46,650
So we start from minus one and then minus well, minus 0.9 and then minus 0.8 and minus 0.7 and so on

92
00:06:46,650 --> 00:06:49,860
until it gets to a zero.

93
00:06:49,890 --> 00:06:51,420
This one is actually zero.

94
00:06:51,420 --> 00:06:56,490
And then it will be 10.1 until it will reach one.

95
00:06:57,090 --> 00:07:05,490
The reason we did from minus one to add plus or 0.1, because in Python it will not consider the last

96
00:07:06,240 --> 00:07:07,140
value.

97
00:07:07,140 --> 00:07:16,500
So it's it's important to add just one, one one step to get this answer and here the we do the same

98
00:07:16,500 --> 00:07:20,010
and but this time it's from zero to actually one.

99
00:07:20,970 --> 00:07:26,370
Okay but we have still left this one and let's understand how it works.

100
00:07:26,370 --> 00:07:32,640
So we this one is basically will give us a map of the whole domain.

101
00:07:32,640 --> 00:07:34,890
So let's just remove self.

102
00:07:34,890 --> 00:07:36,270
So torch stack.

103
00:07:36,300 --> 00:07:39,240
Torch mesh grid mesh grid.

104
00:07:39,240 --> 00:07:40,580
What x?

105
00:07:41,750 --> 00:07:46,360
And T and then he would reshape it and transpose it.

106
00:07:46,370 --> 00:07:47,360
So.

107
00:07:47,630 --> 00:07:49,010
And let's print it.

108
00:07:51,720 --> 00:07:52,270
Printex.

109
00:07:54,470 --> 00:07:56,480
A mistake.

110
00:07:58,420 --> 00:07:58,950
Oh, sorry.

111
00:08:02,560 --> 00:08:02,920
This.

112
00:08:04,240 --> 00:08:13,750
So here we can see that this will yield to minus one the time of zero, minus one, the time of one

113
00:08:13,750 --> 00:08:16,000
minus one, the time of two.

114
00:08:16,030 --> 00:08:24,580
So it will make us a whole domain that what we need to solve, which is we need to solve X and T for

115
00:08:24,580 --> 00:08:27,250
U so the our mesh will look like this.

116
00:08:27,250 --> 00:08:31,000
Of course, it doesn't have to be a uniform mesh or whatever.

117
00:08:31,000 --> 00:08:32,920
Even we don't really need to use mesh.

118
00:08:32,920 --> 00:08:36,130
But of course using now mesh is kind of.

119
00:08:37,250 --> 00:08:44,330
Make our life simpler because it's easy to just uniformly compute the points.

120
00:08:44,750 --> 00:08:47,780
But of course, it's a neural network and you don't have to.

121
00:08:48,050 --> 00:08:51,140
We don't really care about real mesh.

122
00:08:51,470 --> 00:08:57,550
So here what we have is a basically the transpose.

123
00:08:57,560 --> 00:09:01,780
So let's, let's undo a little bit, understand how what's, what's happening.

124
00:09:01,790 --> 00:09:07,130
So for example, if we remove the transpose, what we will get is this way.

125
00:09:07,130 --> 00:09:17,540
So we will have this network which has to for like it will have two dimensions and this is not what

126
00:09:17,540 --> 00:09:20,090
we want, so we have to transpose it.

127
00:09:20,090 --> 00:09:28,190
So we will have here all of this X's and then again, the, the, the X's.

128
00:09:28,190 --> 00:09:31,850
So this is not what what actually we want.

129
00:09:31,850 --> 00:09:41,250
So what we will do or what we have to do is to transpose this from X and of course this is the first

130
00:09:41,250 --> 00:09:54,010
one is going to be the, the, the X points from -1 to 1 and the other one is going to be from 0 to

131
00:09:54,010 --> 00:09:55,740
1, which is the time.

132
00:09:55,980 --> 00:09:58,440
But we don't want that.

133
00:09:58,440 --> 00:10:07,410
So this is why when we put transpose, what will happen is we will actually have this like kind of,

134
00:10:07,950 --> 00:10:16,560
I would say, beautiful list or tensor that has this component and every component will correspond to

135
00:10:16,560 --> 00:10:18,480
X and T only.

136
00:10:19,290 --> 00:10:20,340
A mesh grid.

137
00:10:20,340 --> 00:10:25,290
Also, like if we want to see here, we can also see.

138
00:10:25,290 --> 00:10:32,100
It's always nice to play with these things, to just understand how like these things work.

139
00:10:32,100 --> 00:10:34,500
But let's just comment out this one.

140
00:10:42,100 --> 00:10:42,880
Maybe.

141
00:10:42,880 --> 00:10:43,450
Yeah.

142
00:10:43,690 --> 00:10:44,110
Okay.

143
00:10:44,110 --> 00:10:45,790
We can consider like this.

144
00:10:46,300 --> 00:10:56,380
So we will have X, we will have also the time and here we will have, of course, the Xs and Xs, and

145
00:10:56,560 --> 00:11:07,960
it will also give us a grid with the first one is the tensor of A of the X and the other one is tensor

146
00:11:07,960 --> 00:11:09,310
with the time.

147
00:11:09,310 --> 00:11:13,750
And then we have to reshape it or stack it.

148
00:11:13,780 --> 00:11:19,840
Basically these two tensor become one tensor and then reshape it and then transpose it.

149
00:11:19,840 --> 00:11:24,040
So this is what we did in all of this thing.

150
00:11:25,000 --> 00:11:31,810
Of course there are many ways to do it, but what we at the end of at the end of the day, we need.

151
00:11:32,610 --> 00:11:35,370
Something that looks like this.

152
00:11:35,400 --> 00:11:38,660
We need X and T.

153
00:11:39,760 --> 00:11:46,990
X for all the components of x and then T with all the time steps we have to take.

154
00:11:47,110 --> 00:11:48,460
It's very important.

155
00:11:50,590 --> 00:11:54,790
Okay, so now we did that.

156
00:11:54,820 --> 00:11:56,320
What we have to do now.

157
00:11:57,250 --> 00:12:05,500
We have to start with basically or like continue assigning the the data.

158
00:12:05,500 --> 00:12:10,660
So all of this is basically, well, I will say computation domain.

159
00:12:10,930 --> 00:12:11,650
Domain.

160
00:12:11,650 --> 00:12:20,470
But but of course, we don't really need, um, really, you know, like actual mesh because we're dealing

161
00:12:20,470 --> 00:12:24,340
with neural network and train data.

162
00:12:24,550 --> 00:12:27,580
Well, we start defining them.

163
00:12:27,700 --> 00:12:28,180
Basically.

164
00:12:28,180 --> 00:12:31,330
This is the most important topic now.

165
00:12:31,330 --> 00:12:33,520
They have two boundary condition.

166
00:12:33,520 --> 00:12:35,710
One boundary is a.

167
00:12:36,740 --> 00:12:44,000
That will the left part of the X and the other boundary is the right part of X.

168
00:12:44,000 --> 00:12:46,430
And and of course, we have initial conditions.

169
00:12:46,430 --> 00:12:52,880
The way it works in here, what will have this is not really okay.

170
00:12:52,880 --> 00:13:03,830
So what what we will have is basically we will have X equals zero and then we will have a line and then

171
00:13:03,830 --> 00:13:08,900
you will have X equals a no, sorry.

172
00:13:08,900 --> 00:13:09,650
It's minus one.

173
00:13:09,650 --> 00:13:11,240
I think -1 to 1.

174
00:13:11,270 --> 00:13:11,840
Yeah.

175
00:13:12,420 --> 00:13:19,860
And then you will have a start from zero and then you will have a function, a sine function.

176
00:13:20,250 --> 00:13:28,650
So it will change from -1 to 1 and the sine function will have this u values.

177
00:13:29,720 --> 00:13:32,900
And as the computation progress.

178
00:13:32,900 --> 00:13:35,450
So this is the initial condition.

179
00:13:35,450 --> 00:13:42,200
Maybe put it, let's use another color actually as the solution progress.

180
00:13:42,230 --> 00:13:46,340
It will give us a shape that looks like this.

181
00:13:47,090 --> 00:13:50,450
This is what this is the the general solution of this burgers.

182
00:13:50,480 --> 00:13:58,460
Of course, here t t equals something like, I don't know, like we have from 0 to 1.

183
00:13:58,460 --> 00:13:59,810
We said so let's say one.

184
00:14:00,260 --> 00:14:01,070
So.

185
00:14:01,930 --> 00:14:03,480
As a solution progress.

186
00:14:03,490 --> 00:14:10,120
It will a little bit diffuse and it will have this wave well behavior.

187
00:14:10,210 --> 00:14:14,710
So this is basic burgers equation and it's just very common.

188
00:14:14,710 --> 00:14:16,760
And but we need to get it with neural network.

189
00:14:16,780 --> 00:14:18,010
Of course, this solution.

190
00:14:19,430 --> 00:14:21,020
So let's define this.

191
00:14:21,050 --> 00:14:25,040
We have starting zero here and ending zero.

192
00:14:25,040 --> 00:14:29,390
And in between we need to assign a sign.

193
00:14:29,660 --> 00:14:36,230
We need to assign the initial condition to be sine like sine function.

194
00:14:36,650 --> 00:14:37,490
So.

195
00:14:38,580 --> 00:14:42,480
Boundary condition one is torch dot.

196
00:14:42,960 --> 00:14:44,700
Well, basically we will do the same.

197
00:14:44,700 --> 00:14:45,990
But anyway, let's write it.

198
00:14:45,990 --> 00:14:46,710
Let's write it.

199
00:14:46,740 --> 00:14:52,050
Dot stack, torch dot mesh grid.

200
00:14:53,120 --> 00:14:56,330
And here is X.

201
00:14:57,530 --> 00:15:00,440
Zero and T.

202
00:15:02,510 --> 00:15:02,750
Why?

203
00:15:02,750 --> 00:15:08,510
X0 because simply we we just interested in the the first component.

204
00:15:08,540 --> 00:15:10,160
This is boundary condition.

205
00:15:10,160 --> 00:15:14,990
So with time it has to remain the same boundary conditions.

206
00:15:15,020 --> 00:15:21,200
Of course we can change it if we want, but in this case what we our aim is the boundary condition will

207
00:15:21,200 --> 00:15:22,580
be zero all the way.

208
00:15:22,790 --> 00:15:26,420
So dot reshape.

209
00:15:27,280 --> 00:15:30,970
And this two minus one.

210
00:15:30,970 --> 00:15:31,840
Same shape.

211
00:15:31,990 --> 00:15:33,310
Same like.

212
00:15:33,310 --> 00:15:33,700
Same.

213
00:15:33,700 --> 00:15:34,300
Same.

214
00:15:36,120 --> 00:15:39,090
Same way of assigning this way.

215
00:15:40,290 --> 00:15:41,790
Boundary condition to.

216
00:15:43,060 --> 00:15:44,050
Same thing.

217
00:15:44,050 --> 00:15:48,400
But this one, what it has to be the last element.

218
00:15:48,400 --> 00:15:52,150
So minus one means it's of course it doesn't mean the value.

219
00:15:52,180 --> 00:15:56,320
It means the final element has to be this.

220
00:15:56,320 --> 00:16:04,570
So this this way is we're creating the tensor of the boundary condition if we want to see it.

221
00:16:04,570 --> 00:16:10,450
Just like quickly of like if we want, we can.

222
00:16:11,850 --> 00:16:12,720
Like, Of course.

223
00:16:12,720 --> 00:16:14,490
Here we already printed.

224
00:16:18,130 --> 00:16:20,310
Maybe this one just to make sure.

225
00:16:20,320 --> 00:16:21,100
Test.

226
00:16:21,830 --> 00:16:22,840
Test.

227
00:16:24,080 --> 00:16:24,910
Expressed.

228
00:16:27,500 --> 00:16:29,300
And print this thing.

229
00:16:34,330 --> 00:16:41,420
So we can see that the starting of this is minus one, minus one.

230
00:16:41,440 --> 00:16:50,410
And of course, the time progress, if we want the last one, the last element, we will just put here

231
00:16:50,410 --> 00:16:53,710
minus one and here minus one.

232
00:16:53,710 --> 00:16:59,290
And then you will get the last element and the evolution over the time.

233
00:17:00,600 --> 00:17:01,470
And that's it.

234
00:17:01,470 --> 00:17:04,200
So we continue.

235
00:17:07,910 --> 00:17:11,210
So now we have the boundary condition and.

236
00:17:11,970 --> 00:17:16,050
We we need also the initial condition with it's going to be.

237
00:17:16,990 --> 00:17:24,360
The same thing or the same concept, but we have to be careful about X.

238
00:17:25,610 --> 00:17:27,410
Is its initial condition.

239
00:17:27,410 --> 00:17:33,140
So all x but now the time will be only.

240
00:17:34,560 --> 00:17:38,760
Not the first The zero, which is the first time.

241
00:17:39,620 --> 00:17:40,310
And.

242
00:17:40,460 --> 00:17:42,680
Oh, and for all the excess.

243
00:17:44,320 --> 00:17:46,150
Okay, we're done.

244
00:17:47,270 --> 00:17:48,020
Not yet.

245
00:17:48,020 --> 00:17:49,370
Just a little bit more.

246
00:17:49,670 --> 00:17:55,190
So self dot x x train not.

247
00:17:55,310 --> 00:17:55,640
Yeah.

248
00:17:55,670 --> 00:17:57,860
X underscore train.

249
00:17:59,760 --> 00:18:07,620
Each train will equal torch dot concatenation for.

250
00:18:08,770 --> 00:18:10,380
BC1.

251
00:18:11,960 --> 00:18:13,310
BC2.

252
00:18:14,390 --> 00:18:16,910
And see which is the initial condition.

253
00:18:17,090 --> 00:18:19,370
This is what we defined.

254
00:18:19,400 --> 00:18:20,630
Only the x.

255
00:18:20,780 --> 00:18:26,900
These are the points that the boundary condition points and the initial condition points.

256
00:18:26,900 --> 00:18:31,460
What we need to consider now is the values of the Y.

257
00:18:31,700 --> 00:18:37,520
So y pc one equals sorry, not this way.

258
00:18:37,550 --> 00:18:43,910
Y underscore pc one equals torch dot.

259
00:18:45,160 --> 00:18:46,040
Zeros.

260
00:18:47,200 --> 00:18:49,090
Length of.

261
00:18:49,950 --> 00:18:50,690
A PC one.

262
00:18:51,740 --> 00:18:55,610
So we assign all the values of this to be.

263
00:18:56,550 --> 00:18:58,830
Basically zero or it is zero.

264
00:18:59,610 --> 00:19:01,370
We do the same too.

265
00:19:01,410 --> 00:19:02,880
We said it.

266
00:19:02,910 --> 00:19:04,770
It gets to zero.

267
00:19:05,790 --> 00:19:06,960
I'm not sure it's needed.

268
00:19:06,960 --> 00:19:14,910
But anyway, like, this way, you can see that from here all the way to here, it's always has to be

269
00:19:14,910 --> 00:19:15,450
zero.

270
00:19:15,660 --> 00:19:22,230
This one all the way to here, it's always has to zero and initial condition only the first part.

271
00:19:22,530 --> 00:19:29,190
So this is why we assign zero A, y, C equals.

272
00:19:30,350 --> 00:19:31,190
Torch.

273
00:19:31,220 --> 00:19:32,960
This one is a bit.

274
00:19:35,650 --> 00:19:37,810
A little bit harder, but.

275
00:19:40,140 --> 00:19:43,830
In this example, we need this start from positive.

276
00:19:43,830 --> 00:19:47,730
So let's say minus torch.

277
00:19:49,360 --> 00:19:50,180
Sign.

278
00:19:52,070 --> 00:19:53,030
Math.

279
00:19:54,110 --> 00:19:54,890
Dot pi.

280
00:19:56,350 --> 00:19:57,400
Multiplied.

281
00:19:57,430 --> 00:19:58,120
I see.

282
00:19:59,860 --> 00:20:00,640
But.

283
00:20:01,520 --> 00:20:01,960
I see.

284
00:20:01,970 --> 00:20:04,070
Of what only.

285
00:20:05,280 --> 00:20:07,790
Only the X elements.

286
00:20:07,800 --> 00:20:15,630
So we take the X elements, we take it from here, and then we multiply it with a Pi.

287
00:20:15,840 --> 00:20:26,700
This is actually useful because we said we took math though math pi dot c and we take the sine of the

288
00:20:26,700 --> 00:20:35,220
whole thing and we need minus just to well, draw this kind of starting from a positive.

289
00:20:35,430 --> 00:20:45,750
If you didn't put it it will maybe it will have a different um like picture rather than having the,

290
00:20:45,750 --> 00:20:49,140
the starting of sine like this, it will start like this.

291
00:20:49,140 --> 00:20:54,930
So anyway you have to put this, it's this y value.

292
00:20:55,680 --> 00:20:58,290
To measure the value you need.

293
00:20:58,590 --> 00:21:03,480
Okay, So after that, what we need to do, we need to self.

294
00:21:06,150 --> 00:21:07,270
Solve dot.

295
00:21:08,040 --> 00:21:13,470
Y train equals the same thing.

296
00:21:16,230 --> 00:21:16,970
For.

297
00:21:17,750 --> 00:21:20,250
Why boundary condition?

298
00:21:20,270 --> 00:21:25,820
One Why Boundary condition two and why the initial condition?

299
00:21:27,380 --> 00:21:33,980
And the only thing we need to do is I will explain it a little bit more elaborately.

300
00:21:34,760 --> 00:21:40,790
It is basically is we need to have unsqueeze and.

301
00:21:42,660 --> 00:21:43,800
Squeeze.

302
00:21:45,910 --> 00:21:46,840
With one.

303
00:21:47,990 --> 00:21:49,490
So unsqueezed.

304
00:21:49,520 --> 00:21:50,960
What does it mean?

305
00:21:50,960 --> 00:21:52,310
Why we need it?

306
00:21:52,790 --> 00:21:56,480
We need it because you need all of this.

307
00:21:56,480 --> 00:21:58,310
Let's remove these prints.

308
00:22:03,240 --> 00:22:04,470
And let's.

309
00:22:04,560 --> 00:22:07,590
Let's keep it like this, okay?

310
00:22:07,770 --> 00:22:09,690
So let's let's do unsqueeze.

311
00:22:09,690 --> 00:22:13,080
So let's consider why train this one?

312
00:22:13,260 --> 00:22:16,980
And we call it test equals torch.

313
00:22:17,010 --> 00:22:21,780
Just give it a tensor tensors and it will have.

314
00:22:22,640 --> 00:22:24,680
A one, two, three, four.

315
00:22:25,350 --> 00:22:28,050
So when let's print it.

316
00:22:28,050 --> 00:22:29,460
Print this thing.

317
00:22:29,460 --> 00:22:30,390
And then.

318
00:22:32,500 --> 00:22:33,850
Do the Unsqueeze.

319
00:22:33,850 --> 00:22:36,820
Which is this one.

320
00:22:42,710 --> 00:22:45,530
And see how it will change the dimension.

321
00:22:58,860 --> 00:23:02,490
So you will have what is printing.

322
00:23:04,070 --> 00:23:05,480
There is a print statement.

323
00:23:05,480 --> 00:23:06,220
I don't want it.

324
00:23:06,230 --> 00:23:06,920
Yeah, this one.

325
00:23:06,920 --> 00:23:07,820
Just some of it.

326
00:23:08,120 --> 00:23:14,270
So here what we will have is we will have a tensor that has a list or a vector.

327
00:23:14,870 --> 00:23:16,910
It will have one, two, three.

328
00:23:16,910 --> 00:23:18,410
And this is not what we want.

329
00:23:18,590 --> 00:23:28,370
We want the whole thing to have the dimension of everyone will be a list by itself because all these

330
00:23:28,370 --> 00:23:31,470
work or let's say here we can see the X.

331
00:23:33,750 --> 00:23:35,760
Will have this dimension.

332
00:23:35,760 --> 00:23:41,820
So every, um, every row will represent one data point.

333
00:23:42,590 --> 00:23:44,630
So we needed to match this one.

334
00:23:44,630 --> 00:23:49,130
So this is why we did basically the Unsqueeze thing.

335
00:23:49,710 --> 00:23:51,150
To be like this.

336
00:23:51,840 --> 00:23:59,910
Anyway, this all code is going to be only for testing or just to show how things are defined.

337
00:23:59,910 --> 00:24:03,690
And I will keep it, but I will just comment it out.

338
00:24:03,900 --> 00:24:04,800
So.

339
00:24:05,480 --> 00:24:06,590
By this time.

340
00:24:06,590 --> 00:24:09,380
We already have the data.

341
00:24:10,370 --> 00:24:11,480
We already have.

342
00:24:12,550 --> 00:24:19,720
The X data which is made from the boundary condition and made from the initial condition.

343
00:24:19,720 --> 00:24:26,380
And then we have the Y data, which is also defining the boundary condition and the initial condition.

344
00:24:26,380 --> 00:24:33,470
This is Y, this is where we initialize it and this is in the in the in the when we're dealing with

345
00:24:33,490 --> 00:24:35,850
neural network, it will consider the training data.

346
00:24:35,860 --> 00:24:42,610
Next, we have to assign the other things like we'll talk about losses and optimizer and so on.
