Core Structures and Operations

Tensor Representations

Classes for different tensor representations

Tensor

This class describes multidimensional data.

TensorCPD

Representation of a tensor in the Kruskal form (CPD).

TensorTKD

Representation of a tensor in the Tucker form (TKD).

TensorTT

Representation of a tensor in the Tensor Train form (TT).

Multi-linear Operations

Functions and operations for tensor algebra

Credit to Jean Kossaifi.

unfold

Unfolds N-dimensional array into a 2D array.

fold

Fold a 2D array into a N-dimensional array.

kolda_unfold

Unfolds N-dimensional array into a 2D array.

kolda_fold

Fold a 2D array into a N-dimensional array.

mode_n_product

Mode-n product of a N-dimensional array with a matrix.

kronecker

Kronecker product of a list of matrices.

hadamard

Hadamard product of a list of matrices.

khatri_rao

Khatri-Rao product of a list of matrices.

sampled_khatri_rao

Sampled Khatri-Rao product of a list of matrices.