A digit classifier from scratch

The problem

Build and train a neural network in plain Python that recognizes small pixel images of the digits 0 to 9, and measure how well it works.

Requirements

Technologies

Step by step

  1. Draw the ten digits as small grids of 0s and 1s and write a function that adds noise and shifts.
  2. Write the forward pass and check the output shapes and the starting loss (about log 10).
  3. Write the backward pass and confirm it with a gradient check on a tiny network.
  4. Add mini-batch training with Adam and watch the loss fall.
  5. Add validation, early stopping and the final test evaluation.
  6. Experiment with hidden size, learning rate and dropout, and record the results.

Expected result

A working digit recognizer, written without libraries, with a report of its accuracy and its typical mistakes.

How it is evaluated

Ways to improve it