namedtensor / notation

108 stars 5 forks source link

Reduction/contraction with no axis operates on zero axes #38

Closed davidweichiang closed 3 years ago

davidweichiang commented 3 years ago

Merges elementwise multiplication and contraction operators into a single operator, \odot.

Closes #35.

srush commented 3 years ago

So I am leaning towards this notation. I like that it makes examples like Bayes rule symmetric, uses one less operators, and it seems like a feature that it removes the "global" min interpretation which is a sort of a hack in pytorch / numpy. I have become pretty used to the \cdot, but maybe \odot what correct to begin with?

My sense is that natural contraction is not critical to the main use cases and a bit confusing. If we really need it, we could have \odot_{*} to indicate "contract all in axes in scope".

davidweichiang commented 3 years ago

OK. I think it's simpler overall.