Part 6 (10 points, coding task)
In this part, you are asked to create the dataset \mathcal D_{IC}.
-
Define dataset \mathcal D_{IC} in the way that for each \left( t, x \right) \in \mathcal D_{IC}, t is fixed at 0 and x is evenly sampled from \left\{ 0, 0.01, 0.02, \cdots , 0.98, 0.99, 1 \right\}. Therefore, | \mathcal D_{IC} | = 101.
-
The dataset shall be a tensor with name
dataset_train_IC
and shape(101,2)
. -
Set
dataset_train_IC.requires_grad = True
. -
Print
dataset_train_IC.requires_grad
anddataset_train_IC.shape
. -
Define tensor
u_IC
to be the groud-truth functional values of all data in \mathcal D_{IC} (You can find the formula from Part 1). -
Set
u_IC.requires_grad = True
andu_IC.shape = (101,1)
. -
Print
u_IC.requires_grad
andu_IC.shape
.