Skip to content
ML Academy

Introduced on day 31

Tensor

An array of numbers with a fixed shape; scalars, vectors and matrices are tensors with zero, one and two dimensions.

In detail

Deep-learning code passes tensors between layers: (batch, features) for tabular inputs, (batch, channels, height, width) for images, (batch, sequence, embedding) for text. Reading and asserting shapes is the first debugging tool, because many silent errors are shape errors that broadcast instead of failing.