Examples accompanying the separate updated HTML edition of
Michael Nielsen's Neural Networks and Deep Learning.

Original programs and MNIST data:
https://github.com/mnielsen/neural-networks-and-deep-learning

Use this historical revision to obtain its data directory:
git clone https://github.com/mnielsen/neural-networks-and-deep-learning.git
git -C neural-networks-and-deep-learning checkout 72db53d750f571bef8804de4a52224e44dcab3a1

Copy these
Python modules into its src directory, and run the examples from src.
Install the dependencies in an isolated Python environment with:
python3 -m pip install -r requirements.txt

Verified locally with Python3.12.8, NumPy2.5.5 and PyTorch2.15.0 on CPU.
Checks use small synthetic fixtures, not full MNIST training runs. The
book's historical accuracy figures have not been reproduced with this port.
NVIDIA CUDA execution was not tested on this Mac. network3.py explicitly
selects CPU by default; set its GPU flag to True to select CUDA.

expand_mnist.py creates its output exclusively, preserving an existing file.
The standard expanded float32 image array alone occupies784,000,000bytes;
serialization requires additional memory. MNIST data is not included here.

The original HTML edition and its downloads remain unchanged.

Original code copyright and MIT license: LICENSE-Michael-Nielsen.txt.
The port adapts Michael Nielsen's programs for Python3 and PyTorch.

For the Chapter1 comparison classifiers, install requirements-baselines.txt.
The SVM uses gamma="auto", the historical default; current scikit-learn
uses a different default. Both baselines passed small fixtures with
scikit-learn1.9.1. The darkness classifier reproduced2225/10000 on MNIST;
full MNIST SVM training was not run.
