Part 3 (5 points, coding task)
Do the following tasks:
Let x
be a tensor with shape (N,2)
.
-
What is the number of dimensions of
model(x)
? -
What is the shape of
model(x)
? -
Explain the reasoning of your answers.
Do the following tasks:
Let x
be a tensor with shape (N,2)
.
What is the number of dimensions of model(x)
?
What is the shape of model(x)
?
Explain the reasoning of your answers.
\color{green}{\text{### WRITE YOUR SOLUTION HERE ###}}
The dimension of model(x)
is 2.
The shape of model(x)
is (N,1)
.
For each sample, the output is a 1-dim tensor with shape (1,)
. Therefore, by having N
samples, we get the answers above.
\color{red}{\text{""" END OF THIS PART """}}