namedtensor / notation

108 stars 5 forks source link

Orientation-free notation ? #67

Closed mglowacki100 closed 3 years ago

mglowacki100 commented 3 years ago

Correct me if I'm wrong, but I understood that notation assumes "orientation", in this sense that e.g. height is columnar-vector, width row-vector. I wonder if "transpose-free" version of notation is possible... when you can freely change order of indices. For example in standard notation: A(k, v) * B (s, v).T = C(k, s) In orientation free with yours contraction-multiplication inspired operator, named index gives as info which dimension should match in both matrices: A(k,v) *(v)* B(s,v) = A(k,v) (v)** B(v,s) = A(v,k) (v) B(s,v) = A(v,k) (v) B(v,s)= C(k,s) = C(s,k) So it doesn't matter if you have matrix X or transposed X. I think that addition and concatenation can also be specified with analogous operators to remove ambiguity with broadcasting.

What do you think about it?

davidweichiang commented 3 years ago

Our indices are unordered. Could you help me to see where in the document gives the impression that an ordering is assumed?

mglowacki100 commented 3 years ago

Sorry, after re-reading I've noticed that in section 2.1 is clearly stated that order of axes doesn't matter. I've got confused https://arxiv.org/pdf/2102.13196.pdf - p.4 2.2.1 where x and y are shown as vertical and horizontal vectors.