Video 20 Matrix Multiplication - Why did matmul() work for (1*3)* (1*3) matrix at 2:24:20? #773
-
Hi everyone, Thank you so much Daniel for this amazing course. I had a question- from my understanding, for matrix multiplication, the inner dimensions of the matrices being multiplied should match. However, at 2:24:20, you have a tensor tensor = torch.tensor([1, 2, 3]) that you have multiplied with itself. How did this still give an output (14), and not an error? |
Beta Was this translation helpful? Give feedback.
Answered by
sametucuncu
Dec 25, 2023
Replies: 1 comment 1 reply
-
If both tensors are 1-dimensional, the dot product (scalar) is returned. (resource: torch.matmul documentation) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jsunecha
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If both tensors are 1-dimensional, the dot product (scalar) is returned. (resource: torch.matmul documentation)