Syllabus

Forty-five lessons in seven parts, four checkpoints and a capstone. You start with a line that has two knobs and finish with a framework that trains convolutional and recurrent networks on a CPU or a GPU. Parts I and II are open now; the rest arrive in two more waves.

Each row gives the question a lesson answers. Every lesson runs on the code you wrote in the lessons before it; if you arrive in the middle, one button loads the finished pieces so you can carry on.

Nothing is locked. Your progress is stored only in this browser.

Progress needs JavaScript. Every released lesson reads without it.

  1. Part I · Why learning works at all

    1. 0101 A function with knobsCan a program find its own numbers?~30 minnot started
    2. 0202 How wrong is wrong?Why square the error instead of adding it up?~35 minnot started
    3. 0303 Downhill in the darkYou can only feel the slope underfoot. Now what?~40 minnot started
    4. 0404 The simplest decisionWhat is the simplest thing that makes a decision?~40 minnot started
    5. 0505 Bending spaceWhy stack layers, and why must there be a kink?~35 minnot started
    6. 0606 The bill for nudging10,000 knobs: how many forward passes for one gradient?~30 minnot started
  2. Part II · Autograd on single numbers

    1. 0707 A number that remembersWhat must a number record so we can ask where it came from?~35 minnot started
    2. 0808 Who owes the gradient?Each op knows only its local slope. Is that enough?~40 minnot started
    3. 0909 Many paths, one sumA value used twice: why does = instead of += break training silently?~35 minnot started
    4. 1010 The order of blameIn what order must the graph be visited?~40 minnot started
    5. 1111 Trust, but verifyHow do you know your derivative is right?~45 minnot started
    6. 1212 A network that trains itselfPut it all together: can your engine learn?~45 minnot started
    7. ACheckpoint Anot started
  3. Part III · Tensors and the backend seam Coming in Wave 2

    1. 1313 Why arrays?Same math, far faster. Where did the time go?
    2. 1414 The tensor engineCan the scalar engine's ideas carry over to tensors?
    3. 1515 Adding a row to a whole tableHow does (64,10) + (10,) work?
    4. 1616 Where did my gradient's shape go?The bias gradient came back (64,10). Why?
    5. 1717 Matmul and its gradientCan you derive dA from shapes alone?
    6. 1818 Reshape, index, reduceWhat is the gradient of picking, summing or reshaping?
    7. 1919 The backend seamWhich array operations does your framework actually need?
    8. 2020 Devices you can't mixWhat happens when data and weights live on different chips?
  4. Part IV · A framework you'd want to use Coming in Wave 2

    1. 2121 Where are all my weights?How does an optimizer find every weight in a nested model?
    2. 2222 Why does a deep net go silent?Why do random weights of the wrong size kill a deep net?
    3. 2323 What makes a good kink?What makes a good kink?
    4. 2424 Scores into chancesWhy does exp overflow past about 88.7, and how do we stop it?
    5. 2525 How surprised was the model?Why does a confidently wrong answer need a big gradient?
    6. 2626 Stuck in the ravineCan a ball rolling downhill train faster?
    7. 2727 Why not learn from all the data at once?Why learn from noisy minibatches instead of all the data?
    8. 2828 Can it read handwriting?From ~88% with a hand-rolled loop to ~95% with a framework: what did the framework buy you?
    9. 2929 Worse the longer it trainsWhy does the model get worse the longer it trains?
    10. 3030 Save, load, inferHow do you keep what you learned?
  5. Part V · Seeing: CNNs Coming in Wave 3

    1. 3131 Convolution by handShift a digit two pixels: does your MLP still know it?
    2. 3232 Convolution as a matmulCan we reuse the fast matmul?
    3. 3333 Keeping training stableWhy does a deep CNN train so unevenly, and what fixes it?
    4. 3434 A CNN that beats your MLPIs the idea worth the complexity?
  6. Part VI · Remembering: sequences Coming in Wave 3

    1. 3535 A word is not a numberHow do you feed a word to a matrix?
    2. 3636 What came before?How can a network remember the previous character?
    3. 3737 Exploding and vanishingWhy does the gradient 50 steps back come out as 10⁻¹² or 10¹²?
    4. 3838 A memory that doesn't fadeHow do you build a memory that doesn't fade?
    5. 3939 A character-level ShakespeareCan your framework write?
  7. Part VII · Ready for transformers, ready for GPUs Coming in Wave 3

    1. 4040 Deep stacks that still learnWhy can a 20-layer net still learn?
    2. 4141 Attention, the operationHow can every position look at every other?
    3. 4242 Start slow, end slowWhy start slow, and why end slow?
    4. 4343 Where the memory goesWhy does training use 10× the memory of inference?
    5. 4444 Where did my gradients go?Why do some gradients become zero in float16?
    6. 4545 Out of the browserDoes your framework run on a real GPU unchanged?

Your ember

Each file turns garnet once every lesson that writes to it has passed, and is outlined while it holds reference code.

  • ember/__init__.py
  • ember/basics.py
  • ember/scalar.py
  • ember/scalar_nn.py
  • ember/gradcheck.py
  • ember/backend/__init__.py
  • ember/backend/numpy_backend.py
  • ember/backend/sim_backend.py
  • ember/backend/cupy_backend.py
  • ember/shape.py
  • ember/_tensor.py
  • ember/autograd.py
  • ember/ops/elementwise.py
  • ember/ops/reduce.py
  • ember/ops/matmul.py
  • ember/ops/movement.py
  • ember/ops/conv.py
  • ember/nn/module.py
  • ember/nn/init.py
  • ember/nn/linear.py
  • ember/nn/activation.py
  • ember/nn/functional.py
  • ember/nn/dropout.py
  • ember/nn/conv.py
  • ember/nn/pool.py
  • ember/nn/norm.py
  • ember/nn/embedding.py
  • ember/nn/rnn.py
  • ember/optim/optimizer.py
  • ember/optim/sgd.py
  • ember/optim/adam.py
  • ember/optim/lr_scheduler.py
  • ember/optim/clip.py
  • ember/data/dataset.py
  • ember/data/loader.py
  • ember/io.py
  • ember/amp.py
  • ember/utils/__init__.py
  • ember/utils/hooks.py
  • ember/utils/profile.py
  • ember/datasets.py

Back up, restore and erase need JavaScript.