DareData / lp-pytorch-fundamentals

Learning Materials for Pytorch Fundamentals
10 stars 2 forks source link

00_pytorch_fundamentals_exercises Exercise 3 #6

Closed rjna closed 10 months ago

rjna commented 10 months ago

3. Perform a matrix multiplication on the tensor from exercise 2 with another random tensor with shape (1, 7) (hint: you may have to transpose the second tensor).

Create another random tensor

Perform matrix multiplication

result_ex3 =

Checks

assert torch.is_tensor(result_matrix) assert result_ex3.shape == (7, 1), "Are you using the transpose of the new Tensor?"

It's unclear what should we name the random tensor and the matrix originated by the multiplication. A more clear description of the task imo would be:

3. Perform a matrix multiplication on the tensor from exercise 2 with another random tensor with shape (1, 7) (hint: you may have to transpose the second tensor).

Create another random tensor

another_random_tensor =

Perform matrix multiplication

result_ex3 =

Checks

assert torch.is_tensor(another_random_tensor) assert result_ex3.T.shape == (7, 1), "Are you using the transpose of the new Tensor?"

rjna commented 10 months ago

@ivopbernardo FYI

ivopbernardo commented 10 months ago

makes sense!