Lab 5 of 7about 40 minutes
Who reads a moved digit
It uses what you learned in Architecture families and What hidden layers learn.
You will train an MLP and a small CNN on the digits, move every picture one pixel to the right and see which still reads it, then look inside each one's hidden layer for what it keeps of a moved digit.
- The MLPRun it
- The CNN, and its shape errorYour turn
- Move every digitYour turn
- The nearest picturesYour turn
- What each hidden layer keepsYour turn
- Scrambled pixelsOn your own
curl -LsSf https://astral.sh/uv/install.sh | sh
cd learn-deep-learning/labs/dl-lab-moved-digit/starter
uv syncWhen you have run it
In step 3, what share of the 360 does the MLP get right when every picture is moved one pixel to the right, in percent?
Run on macOS on an M1 Max, uv 0.11.15, Python 3.12, PyTorch 2.15.0, NumPy 2.5.5, scikit-learn 1.9.1. Checked on .
