Gradient
Lesson 3.5MathCode~50 min

Tensors, shapes & broadcasting

Images, batches and sequences as stacks of numbers — and the shape rules that make deep-learning code work.

Module 3 · 0/7 done

Beyond the grid

A number, a list of numbers, a grid of numbers… what comes next? A stack of grids. Then a row of stacks. The general word for all of these is tensor. It’s the “Tensor” in TensorFlow, and the thing every AI chip is built to crunch.

A tensor’s rank is how many indices you need to point at one number inside it. Its shape lists how far each index goes.

Fig 3.8Tensors of rank 0 to 4. Hover any cell to see the indices that point at it — one index per axis.