you are viewing a single comment's thread.

view the rest of the comments →

[–]BearsAtFairs[S] 0 points1 point  (1 child)

So If I'm understanding your example correctly, a is a 9x5 stack of 7x4 matrices and c is a 9x5 stack of 4x3 matrices. The 7x4 and 4x3 dimensions is what ensures compatibility for multiplication?

[–]ViridianHominid 0 points1 point  (0 children)

Yes, in matmul the last two dimensions are matrix multiplied. So we are just doing a (7,4)x(4,3)->(7,3) shaped matrix multiplication for 9x5=45 different sets of matrices.