This repo trains a simple Convolutional Neural Network (CNN) on the MNIST handwritten digit dataset (10 classes: 0-9).
python -m venv .venv
source .venv/bin/activate # (Windows: .venv\Scripts\activate)
pip install -r requirements.txtpython train.py --epochs 5 --batch-size 128 --lr 0.001The script saves:
runs/<timestamp>/metrics.jsonruns/<timestamp>/confusion_matrix.pngruns/<timestamp>/training_curves.pngruns/<timestamp>/sample_predictions.pngruns/<timestamp>/best_model.pt
- First run downloads MNIST automatically via torchvision.
- Works on CPU. If you have a GPU + CUDA, PyTorch will use it automatically.
- Nawaf Alqahtani
- Nasser Al Malki
- Mohammed Ajwah
- Yazzed Alsheri
- Maria Almansour
Nawaf Alqahtani – Project coordination, repository setup, final integration, model tuning, and overall review.
Nasser Al Malki – CNN model architecture design and explanation of layer choices (convolution, pooling, dropout).
Mohammed Ajwah – Training pipeline implementation, dataset splitting, and hyperparameter experimentation.
Yazzed Alsheri – Model evaluation, confusion matrix generation, and accuracy analysis.
Maria Almansour – Report writing, formatting, references, and presentation of results.