Prerequisites & Notation
Before You Begin
This chapter assumes familiarity with NumPy array programming, basic linear algebra operations, and the notion of computational graphs. We also rely on CuPy concepts from Chapter 10.
- NumPy array creation, broadcasting, and vectorization (Chapter 5)(Review ch05)
Self-check: Can you reshape, broadcast, and slice NumPy arrays fluently?
- Linear algebra: eigenvalues, SVD, solving linear systems (Chapter 6)(Review ch06)
Self-check: Can you compute an SVD and explain what the singular values represent?
- GPU programming concepts with CuPy (Chapter 10)(Review ch10)
Self-check: Do you understand host vs. device memory and why data transfers are expensive?
- Complex numbers and Hermitian matrices
Self-check: Do you know that in general for complex functions?
- Calculus: chain rule, gradients, Jacobians
Self-check: Can you differentiate using the chain rule?
Notation for This Chapter
Symbols and conventions introduced in this chapter. We follow PyTorch's convention of calling multi-dimensional arrays tensors.
| Symbol | Meaning | Introduced |
|---|---|---|
| A PyTorch tensor (uppercase boldface) | s01 | |
| Gradient of scalar with respect to tensor | s02 | |
| Partial derivative of loss w.r.t. parameter tensor | s02 | |
| Wirtinger derivatives for complex-valued functions | s03 | |
| Singular value decomposition | s04 | |
| The fundamental data structure in PyTorch | s01 | |
| Attribute storing accumulated gradients on a leaf tensor | s02 |