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?"
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?"