You will train an autoencoder on the digits with their labels put away, reuse its encoder to read digits from only ten labelled pictures of each, frozen and then fine-tuned, and hold both against a network trained from scratch on the same few.

About 45 minutes. You do it on your own computer. You need your own computer, with uv (free); Windows, Linux or a Mac with Apple silicon, since PyTorch no longer ships for Intel Macs; about 1 GB of disk for PyTorch.

  1. Ten labels a digit, from scratchRun it
  2. An autoencoder, labels put awayYour turn
  3. The encoder, frozenYour turn
  4. Fine-tuned, gentlyYour turn
  5. Three ways, five picksYour turn
  6. Three labels, or thirtyOn your own
Terminal
curl -LsSf https://astral.sh/uv/install.sh | sh
cd learn-deep-learning/labs/dl-lab-few-labels/starter
uv sync

See it on GitHub

When you have run it

In step 4, before you mend it, the fine-tune at a rate of 0.1: what happens when the old decoder draws back from the tuned encoder?

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 .