Project DelphiTensors Workshop

Core tensor

Core tensor — a small tensor describing how the retained mode patterns interact. Spanish: tensor núcleo.

core = np.einsum('ijk,ia,jb,kc->abc', T, Us[0], Us[1], Us[2]) # (2, 2, 3)

One einsum contracts the original tensor against all three factor matrices at once. That expression — three axes contracted in one string — is why einsum came first in section 06.

The core is what distinguishes Tucker from CP: CP has no core at all.