How would we multiply a tensor with a dimension of three or more? #843
Answered
by
IlanVinograd
kunal-1320
asked this question in
Q&A
-
For instance, when multiplying two matrices using matrix multiplication, the length of matrix 1's column and the length of matrix 2's row should match. Does this hold true for dimension three tensors? code: for the dimension 2
for dimension 3
|
Beta Was this translation helpful? Give feedback.
Answered by
IlanVinograd
Mar 1, 2024
Replies: 1 comment 3 replies
-
http://matrixmultiplication.xyz/ This is good site to understand multiplication with matrix try it. A picture is worth a thousand words |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ow sorry I did'nt understand the question in the first time.
For multiplying matrices, it's essential that the number of columns in the first matrix matches the number of rows in the second matrix. This rule is also applicable to tensors of higher orders (such as three-dimensional tensors), but its interpretation becomes somewhat more complex due to the addition of extra dimensions.
In the case of three-dimensional tensors, which can be thought of as stacks of matrices, the matching size rule for multiplication is modified. When multiplying two three-dimensional tensors, seen as stacks of matrices, each matrix from the first tensor is multiplied by the corresponding matrix in the second t…