t=m+n
x=torch.einsum('xyzw,xyzw->xyzw',m,n)
When I try this code, I get x that's different from t, which is surprising. Why does this happen?
t=m+n
x=torch.einsum('xyzw,xyzw->xyzw',m,n)
When I try this code, I get x that's different from t, which is surprising. Why does this happen?
einsum is actually a product of its inputs. It's only a sum over the indexes that do not occur in the output.
So,
x=torch.einsum('xyzw,xyzw->xyzw',m,n)
is actually equivalent to
x = m * n