This repository contains a standalone training script train.py that show how to train a simple CNN on the MNIST digits dataset using PyTorch.
Quick start (PowerShell):
# quick smoke test: small subset, 1 epoch
python train.py --quick --epochs 1 --batch-size 64
# full training example
python train.py --epochs 5 --batch-size 64 --save-path mnist_cnn.pt
# use early stopping
python train.py --quick --epochs 50 --batch-size 64 --early-stopping --patience 2 --min-delta 0.01 --save-path mnist_cnn.pt
Notes: