Conclusion

This chapter introduced deep learning as organized computation on arrays.

The main ideas were deliberately small:

  • a scalar has no visible axis;
  • a vector has one axis;
  • a matrix has two axes;
  • a tensor is the general word for an array with axes;
  • shape records the size of each axis;
  • a batch groups examples;
  • a feature dimension describes each example;
  • a layer can change feature size while preserving batch size.

These ideas will appear again in every later chapter. Dense layers, activations, losses, gradients, convolution, recurrence, attention, and transformer blocks all become easier when the shapes are visible.

The next chapter will use these shape habits to describe a model as a function with parameters.