Python 3 examples for Neural Networks and Deep Learning
Run from src with the pinned MNIST dataset at ../data/mnist.pkl.gz.
See the book for the historical repository checkout command.
Install requirements.txt; comparison classifiers additionally require requirements-baselines.txt.
For network3.py set DEVICE explicitly to torch.device("cpu"), torch.device("cuda") for NVIDIA CUDA, or torch.device("mps") for Apple Metal. There is no automatic device fallback.
The MPS examples use float32 tensors. This edition was tested with Python3.12.8,NumPy2.5.5 andPyTorch2.15.0 on an Apple M4Pro.
Random initialization makes training results vary. Exact run seeds and outputs are supplied with the execution report.
The original Michael Nielsen MIT license is retained in LICENSE-Michael-Nielsen.txt.
