Part 4 (5 points, coding task)
Do the following tasks in this part.
-
Construct an object in the class
My_Linear_Numpycalledlinear_model_np. -
Set
in_features = 3andout_features = 5. -
Create multiple
Xwith 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
Xas the input. Print the shape of each output.