Home › Glossary › Systems › Einsum notation

Advanced · Systems

Einsum notation

Visual diagram · (in preparation) · Math · (in preparation) · Worked example · 3 difficulty levels.

TL;DR. A concise notation for expressing tensor operations like multiplication and summation across specified axes.

Technical Definition

A concise notation for expressing tensor operations like multiplication and summation across specified axes.

How it works

Einsum notation, often implemented in libraries like NumPy, provides a compact and powerful way to define complex tensor operations. It uses a subscript notation to specify how elements of input tensors are multiplied, summed, or permuted to produce an output tensor. This notation simplifies operations that would otherwise require multiple reshaping, transposing, and broadcasting steps.

Related Concepts

  • Tensor — A multidimensional array used to represent data in many dimensions, fundamental to deep learning.

Further Reading

  • Google ML Glossary