What are Tensor Diagrams?

Machine learning involves a lot of tensor manipulation, and it's easy to lose track of the bigger picture when manipulating high-dimensional data using notation designed for vectors and matrices.

It turns out all the trouble with tensors disappears when you instead represent them using graphs:

Tensor Diagram Example

This book aims to standardize the notation for tensor diagrams by rewriting the classical "Matrix Cookbook" using this notation.

Tensor diagrams are better than alternative notation like Index Notation (einsum) because they:

Tensorgrad

is a python library for symbolic tensor manipulation and derivatives using tensor diagrams. Try it here: