Glossary term
Glossary term
Infrastructure and Serving
An efficient notation for describing how two tensors are to be combined. The tensors are combined by multiplying the elements of one tensor by the elements of the other tensor and then summing the products. Einsum notation uses symbols to identify the axes of each tensor, and those same symbols are rearranged to specify the shape of the new resulting tensor.
NumPy provides a common Einsum implementation.
Created for this library
A research engineer uses Einsum notation in PyTorch to express attention products compactly without juggling explicit reshape calls.
An ML platform team adopts Einsum notation in its model code so contributors read the math directly rather than chained reshapes.
A research team prefers Einsum notation in its experiments because expressing tensor contractions explicitly catches shape errors early.
Definition source: Google for Developers Machine Learning Glossary | Creative Commons Attribution 4.0 License