New
Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow
A practical, project-driven introduction to machine learning and deep learning with Python
Published
2016
A step-by-step guide to building neural networks from scratch in Python
Build a working neural network in Python from the ground up, and understand exactly why every line of code does what it does.
Make Your Own Neural Network strips away the mysticism around AI and machine learning by guiding you through the mathematics and code behind a real, working neural network. Starting with basic Python and simple maths, Tariq Rashid builds up the theory incrementally, so you finish the book having written a neural network that can recognise handwritten digits β and, more importantly, knowing why it works.
Neural networks are behind voice assistants, image recognition, and language models. Most introductory resources either gloss over the maths or assume you already hold a graduate degree in statistics. This book takes neither shortcut.
Tariq Rashid starts from first principles. You learn what a neural network actually is β a series of weighted connections tuned by repeated error correction β before a single line of code is written. The maths (gradients, matrix multiplication, backpropagation) arrives piece by piece, explained in plain language with worked examples, not thrown at you as prerequisites.
By the time you reach the final project, you will have built a neural network in Python that reads the classic MNIST handwritten digit dataset and classifies images with accuracy that would have seemed remarkable a decade ago. You typed every line. You understand every step. No black-box library hides what is really happening.
The book is deliberately short and focused. There are no detours into unrelated algorithms or framework comparisons. The goal is one thing done well: a reader who picked up the book with curiosity and basic Python walks away with a working neural network and a solid mental model of how deep learning actually learns.
If you have ever wanted to understand neural networks beyond a surface-level description, this is where to start.
Introduces the biological metaphor behind artificial neurons and explains why the brain-inspired model is so powerful for pattern recognition. You build a clear mental picture of what a neural network is before any code appears.
Walks through the mathematics of a single-layer classifier, covering weighted sums and the idea of a threshold. You implement a minimal working example to see the core mechanics in isolation.
Introduces activation functions and explains why a non-linear step is essential. You explore how the sigmoid function shapes outputs and why it makes learning possible.
Covers the error-correction loop at the heart of supervised learning, introducing gradient descent and backpropagation step by step. By the end you have a network that adjusts its own weights after each example.
Reframes the forward and backward passes as matrix operations, showing why NumPy makes this practical. You refactor your earlier code into a clean, matrix-based implementation.
Extends the two-layer model to a full input-hidden-output architecture. You implement and test the complete network structure that will carry through to the final project.
Applies your network to the MNIST dataset and walks through loading, normalising, and feeding real image data. You measure classification accuracy and tune learning rate and epoch count to improve results.
Shows how to export your trained network and run it on a Raspberry Pi, demonstrating that the code you wrote is genuinely self-contained. You classify live handwritten input on low-cost hardware.
You need to be comfortable with basic Python syntax: variables, loops, functions, and importing libraries. No prior experience with machine learning, NumPy, or mathematics beyond secondary-school level is assumed.
No. The network is built using only Python and NumPy so that every operation is visible and understandable. The point is to learn what frameworks do under the hood, not to learn a specific framework.
The fundamentals of feedforward neural networks and backpropagation have not changed. This book teaches those foundations, which remain the prerequisite for understanding modern deep learning frameworks and architectures.
You build a neural network that classifies handwritten digits from the MNIST dataset. The project runs end-to-end in plain Python and achieves accuracy in the high nineties percent range with a tuned configuration.
It is aimed at people who have at least a little programming experience. Absolute beginners may find the pace comfortable, but having written a Python script or two before will help you focus on the neural network concepts rather than the syntax.
No. The book focuses entirely on fully connected feedforward networks. That focus is intentional β mastering this architecture gives you the foundation to move on to CNNs and RNNs with confidence.
New
A practical, project-driven introduction to machine learning and deep learning with Python
New
An Iterative Process for Production-Ready Machine Learning Applications
by Chip Huyen
New
A rigorous foundation in Bayesian reasoning, probabilistic models, and modern machine learning methods
New
The definitive textbook on intelligent systems, from foundational search and logic to modern machine learning and probabilistic reasoning
by Peter Norvig, Stuart Russell