Tensor
A generalization of scalars, vectors, and matrices to any number of dimensions.
- PyTorch/TF/JAX: just an n-dim array.
- Pure math: a multilinear map (extra structure).
- Shape juggling is the most common DL debug task.
When to use: Any time data has more than 2 axes: image batches, video frames, transformer attention.
Example: Batch of 32 RGB images at 224×224 → tensor shape (32, 3, 224, 224) in PyTorch.