Repository navigation
tensor multiplication #1383
Replies: 2 comments
|
tt2 and t2t will perform an element wise multiplication i.e.
Therefore, tt2 and t2t both produce the same result.
|
|
matmul does real matrix multiplication, no broadcasting shortcut there. (3,3) @ (1,3) fails because the inner dims dont line up (3 != 1). youd need (3,3) @ (3,1) → (3,1), or flip it: (1,3) @ (3,3) → (1,3). rule of thumb: |
Uh oh!
There was an error while loading. Please reload this page.
t is a tensor of shape 3,3 and t2 is a tensor of shape 1,3
when i do tt2 and t2t it works and both gives the same tensor of size 3,3
but when is apply torch.matmul(t,t2), it fails, why ?
All reactions