Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Homework: MNIST With NumPy

Your task is to train a small neural network that recognizes handwritten digits from MNIST.

You are given:

  1. mnist.py for downloading/loading the dataset as NumPy arrays.
  2. neural_network.py with a basic feed-forward network and manual gradients.
  3. optimizer.py with simple gradient-descent helpers.

Your job:

  1. Load the dataset and understand the shapes.
  2. Prepare the labels in a useful format for training.
  3. Choose a network architecture for digit classification.
  4. Write the training loop.
  5. Measure accuracy on data the model did not train on.
  6. Try a few settings and briefly describe what worked best.

Setup:

pip install numpy matplotlib

Quick dataset check:

python mnist.py

MNIST images are returned as flat arrays of length 784; each label is a digit from 0 to 9.

Optional UI starter:

python paint_predict.py

It lets you draw a digit and call Predict; the Train button is intentionally left for you to implement.

About

MNIST NumPy homework starter

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages