Lab 03 · Homework 03
MNIST, and what the code is doing.
AI can write the HW3 code quickly. The optional materials here help you read it: predict what a cell will do, check the numbers by hand, change one thing, and explain the result in your own words.
Homework 3 assignment
Linear regression, overfitting, decision boundaries, and a guided walk through fast.ai Chapter 4.
Find the handout on CanvasCompanion worksheets
Seven short worksheets, one for each HW3 question. Predict, trace by hand, tweak, and explain what your generated code does.
Open the worksheets → Optional · notebookPython warm-up
No coding background needed. Twelve short sections with self-checking exercises, from "what is a variable" to a five-step gradient descent loop.
Open in Colab → Bonus readingA small cost for large weights
Add an L2 penalty to the Chapter 4 loss, and see how it discourages overfitting.
Read the explainer → Stretch readingBinary cross-entropy
Compare the standard classification loss with Chapter 4's mnist_loss.
- Colab in the browser: nothing to install. The best choice if you just want it to work.
- VS Code with a Colab server: the notebook stays in VS Code, next to your Git and Codex work, but runs on Google's servers. Install the Jupyter and Colab extensions, click Select Kernel → Colab → Auto Connect, and sign in with Google. See Google's setup guide.
- VS Code with Python on your computer: works offline, but you install Python and the packages in
requirements.txtyourself. Choose this once you're curious how Python environments work.
To run the warm-up outside Colab, download the notebook file.