// the find
mnielsen/neural-networks-and-deep-learning
Code samples for my book "Neural Networks and Deep Learning"
The code companion to Michael Nielsen's free online book teaching neural network fundamentals from scratch. It's for someone who wants to understand backpropagation and gradient descent by implementing them in raw Python/numpy rather than importing a framework.
The network.py implementation is small enough to read start to finish in one sitting and maps directly onto the math in the book, which is the whole point. network2.py adds cross-entropy cost and regularization as a second pass, so you can see the delta between a naive and improved implementation rather than one monolithic version. It's a genuinely good pedagogical artifact — most intro deep learning material skips straight to a framework and this doesn't.
Python 2.6/2.7 only, and the author has explicitly said he won't port it — on a repo last touched in 2024 that's a real wall for anyone trying to just clone and run it today. network3.py depends on Theano 0.6/0.7, a library that's been dead for years, so a third of the repo is unrunnable without someone else's compatibility fork. No tests, no packaging, no CI — it was never meant to be used as a library, only read, and treating it as anything more than a reading companion will cause pain.