Classify handwritten digits (0–9) using a small PyTorch neural network trained on the MNIST dataset.
Train a 2-layer MLP on MNIST: load data, train for 10 epochs with Adam, and report test accuracy.
- Install dependencies:
torch,torchvision - Open
main.ipynbin Jupyter or a compatible environment - Update the data path in the dataset cell if needed (default is a Colab path; use e.g.
./datalocally) - Run all cells in order
The notebook downloads MNIST, trains the model, and prints loss and test accuracy per epoch.