Part 4 (5 points, coding task)
Do the following tasks in this part.
-
Construct an object in the class
My_Linear_Numpy
calledlinear_model_np
. -
Set
in_features = 3
andout_features = 5
. -
Create multiple
X
with the following different shapes, but common numpy random seed number 2025 and the same standard normal distribution.-
(in_features,)
-
(10,in_features)
-
(10,20,in_features)
-
(10,20,30,in_features)
After generating
X
, reset the numpy random seed number to its default value. -
-
We call our constructed function with each of the above
X
as the input. Print the shape of each output.