Å·±¦ÓéÀÖ

Jump to ratings and reviews
Rate this book

Make Your Own Neural Network

Rate this book
A gentle journey through the mathematics of neural networks, and making your own using the Python computer language.

Neural networks are a key element of deep learning and artificial intelligence, which today is capable of some truly impressive feats. Yet too few really understand how neural networks actually work.

This guide will take you on a fun and unhurried journey, starting from very simple ideas, and gradually building up an understanding of how neural networks work. You won't need any mathematics beyond secondary school, and an accessible introduction to calculus is also included.

The ambition of this guide is to make neural networks as accessible as possible to as many readers as possible - there are enough texts for advanced readers already!

You'll learn to code in Python and make your own neural network, teaching it to recognise human handwritten numbers, and performing as well as professionally developed networks.

Part 1 is about ideas. We introduce the mathematical ideas underlying the neural networks, gently with lots of illustrations and examples.

Part 2 is practical. We introduce the popular and easy to learn Python programming language, and gradually builds up a neural network which can learn to recognise human handwritten numbers, easily getting it to perform as well as networks made by professionals.

Part 3 extends these ideas further. We push the performance of our neural network to an industry leading 98% using only simple ideas and code, test the network on your own handwriting, take a privileged peek inside the mysterious mind of a neural network, and even get it all working on a Raspberry Pi.

All the code in this has been tested to work on a Raspberry Pi Zero.

224 pages, Kindle Edition

First published March 1, 2016

170 people are currently reading
1,991 people want to read

About the author

Tariq Rashid

16?books32?followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
376 (54%)
4 stars
212 (30%)
3 stars
72 (10%)
2 stars
18 (2%)
1 star
9 (1%)
Displaying 1 - 30 of 93 reviews
Profile Image for William Anderson.
134 reviews25 followers
June 23, 2016
This was a very gentle/step by step walkthrough of building a neural net using python for recognizing handwritten numbers. While I recommend following along in code for this type of book (one third is code based) even if you are a commute reader, you will get a lot out of this.

After reading this (carefully) you will most likely be able to converse and talk about neural nets from an implementation point of view with other engineers.

The tone is approachable, and despite the subject, the book is actually an easy read. Would be fantastic if more books on such deep/complex topics could explain it in such an approachable manner.

There are notably a lot of typos though. :/
Profile Image for Noura Hussein.
23 reviews5 followers
June 1, 2018
Great introduction to explain main fundamental concepts of neural networks, the graphs are pretty and explain the ideas in good way. highly recommend to those who wanna understand Neural network and the math idea behind it.
Profile Image for Hojjat Sayyadi.
188 reviews12 followers
December 11, 2023
????? ??? ???? ?? ?? ?????? ?? ??? ' ???? ???? ?????? ?? ???? ???????' ?????. ???? ??? ???????? ?? ???????? ???? ???? ????? ???? ??? ?? ?? ???? ????? ????? ?????. ???? ?????? ?????? ????.
Profile Image for Arshad.
8 reviews1 follower
March 15, 2022
What an amazing book! Brief, to the point, clear explanation with minimum repetition(where required) and easy to read. Although I was familiar with the concept and math behind it, this book helped fully understand the Neural Networks and mechanisms behind it. Also, the gentle introduction to derivatives was a good refresher. It doesn't go deep too much into details and complications, so it is well written for the beginners.
Overall, I really enjoyed the book.
Profile Image for Kiran Gangadharan.
37 reviews19 followers
November 9, 2016
A nice and short introduction to the fundamentals of Neural Networks. The writing is clear and the content is easy to grasp for a beginner. There were a few issues with typos and formatting, but overall , I had a good time with this short book.
Profile Image for Minh Nh?t.
92 reviews49 followers
May 10, 2018
l?n ??u ti¨ºn review 1 s¨¢ch li¨ºn quan t?i c?ng ngh?/l?p tr¨¬nh d¨´ h?n 1 n?m qua ??c c? n¨²i s¨¢ch v? m?ng n¨¤y :v

n¨®i chung l¨¤ step-by-step th¨¬ c?ng kh¨¢ d? hi?u c¨¢i c?t l?i c?a m?t neural network t? d?ng c? b?n nh?t c?a n¨® g?i l¨¤ perceptron(tin m¨¬nh ?i l¨¤ n¨® ??n gi?n l?m, d¨´ng to¨¤n to¨¢n c?ng v¨¤ nh?n th?i) r?i ?i l¨ºn ph?c t?p l¨¤ m?t m?ng c¨¢c neural, t?i ??u th¨¬ v?n c¨°n ??n gi?n l¨¤, ¨¢p d?ng th¨ºm t¨ª t¨ªnh to¨¢n b?ng ma tr?n m¨¤ b?n s? th?y th?t s? th¨² v? l¨¤ ma tr?n s? gi¨²p qu?n l? c¨¢i ??ng neural kia ?? n¨® t¨ªnh to¨¢n cho ra (¨ªt nh?t m?t) output nh? n¨¤o. r?i l¨ºn c?p n?a s? l¨¤ tensor, m?t ki?u matrix of matrix, ... t¨®m l?i l¨¤ m?i th? r?t r? r¨¤ng, h?u d?ng, ??y intuition. D?n ??c cho bi?t hay ¨¢p d?ng c? ???c t?i m?c n¨¤y l¨¤ ngon r?i :)), v¨¤ ch?c ch?n l¨¤ kh?ng th? so v?i d?n chuy¨ºn ng¨¤nh ???c :')

T? ??y b?t ??u kh¨® h?n l¨¤ s? ph?i hi?u b¨¤i to¨¢n machine learning l¨¤ t?i ?u h¨¤m h¨¤m m?t m¨¢t(loss function) c?a c? c¨¢i h? tr¨ºn v?i 1 ?¨®ng ??o h¨¤m, gradient descent, stochastic gradient descent, ...

kh¨® h?n n?a th¨¬ ... c¨¢i n¨¤y m¨¬nh c?ng ch?a bi?t =))
Profile Image for Konner Macias.
1 review
July 17, 2023
Most clear and simple walk through of a neural network I¡¯ve read online over the past 6 years. This book demystifies what appears to be an incredibly complicated system into borderline obvious system.

Math is gently introduced and really highlights how beautiful it can be to accomplish goals such as this one.

Clean Python code too
Profile Image for Alex Bilyk.
34 reviews3 followers
December 14, 2017
The best book on the planet for absolute beginners. I have implemented F# Neural Network for MNIST database
When training process uses epochs and other tips then recognition score is above 97%. Source code uses Math.NET matrix calculus.
All neural network ideas are from "Make Your Own Neural Network" book with Python source code /book/show/2...
I have decorate implemented it using lovely functional F# and other .NET Framework stuff.
First neural networks were implemented on functional language.
Profile Image for ÐùÔ¯ÓùÁú.
1 review
April 3, 2019
It's a great book to get an overview of the concept of neural networks, and there're lots of vivid graphs to help you understand various ideas from bio, computer, and maths. It's newcomer-friendly and I recommend all fresh learners who wanna know why and figure out some simple mathematical principle behind the surface of AI. Although they are a little simple but are the bedrocks.

I'm a newcomer too. Thanks to the sharing from author Tariq.
Profile Image for Tony Poerio.
212 reviews13 followers
December 16, 2016
This is a great little book. Details how to build a working neural network in simple Python, building up intuition from scratch. If you've studied Neural Nets, this won't be new--but if you've never seen the material before, this might be the best place to start. Very good treatment of the subject.
Profile Image for Shakirul Khan.
53 reviews8 followers
December 23, 2021
Even a school kid can understand this one. This book is divided into two parts. The first half gives a higher-level overview of how a neural network works. And in the second part, a neural network is created from scratch using Python.
I didn't have to look at the second part to code an NN.
Profile Image for Alb85.
335 reviews10 followers
December 24, 2020
Come funzionano e reti neurali?

Prima di leggere questo libro non ne avevo la minima idea e pensavo fossero strumenti estremamente difficili da comprendere.

In realt¨¤ i concetti che stanno alla base delle reti neurali sono semplici.

Queste sono le cose che ho capito leggendo il libro:
- Una rete neurale pu¨° essere rappresentata visivamente come un grafo dove i nodi sono raggruppati per livelli. I nodi di un livello sono connessi con tutti i nodi del livello successivo. I collegamenti hanno un valore (peso) che viene settato nella fase di ¡°addestramento¡±. Gli output dei nodi, moltiplicati per il peso del collegamento, vengono sommati e dati prese come input da una funzione di attivazione (che ¨¨ la stessa per ogni nodo).
- Per il fatto che una rete pu¨° essere vista come insiemi di nodi tutti connessi tra loro, la struttura dati che si adatta al meglio ¨¨ la sequenza di matrici. I nodi di ogni livello sono matrici da una colonna, i pesi degli archi sono matrici da n x m nodi.
- La funzione di attivazione spesso usata ¨¨ la funzione di sigmoidea perch¨¦ ¨¨ facile da integrare. Si deve integrare quando si addestra la rete per aggiornare i pesi della rete.
- I dati sono il cuore di una rete neurale. Devono essere numerosi per addestrare al meglio la rete. Il maggior lavoro non ¨¨ implementare la rete ma armonizzare i dati da dare in pasto alla rete.
- Per addestrare una rete, di prende un dato in input e si sottrae all¡¯output il valore desiderato, detto errore. Attraverso il processo detto di ¡°backpropagation¡± si calcola l¡¯errore dei nodi intermedi.
- L¡¯aggiornamento dei pesi ¨¨ un processo iterativo che ne incrementa o decrementa il valore in base alla derivata (la pendenza) della funzione di errore.

Nella seconda parte del libro, viene spiegato come implementare una rete neurale in Python per riconoscere numeri scritti a mano.

Ho trovato molto curiosa la ¡°backquery¡±, cio¨¨ l¡¯operazione che permette di vedere quali sono gli input desiderati partendo da un output scelto. Ad esempio, scegliendo come output il numero ¡°3¡± si vede quale immagine la rete neurale prenderebbe in input per avere il 100% della confidenza che l¡¯immagine rappresenti il valore 3.
131 reviews5 followers
May 27, 2020
This is a great book for understanding how neural networks work at a practical level using python. Tariq Rashid explains the steps in a detailed and interesting way with a reassuring hand-holding style to take you with him. Having said that I did get lost a bit in some of the maths, but I was able to keep going anyway and still get great benefit. The bits I loved were his experimenting with tweaks to the neural network parameters to show very clearly how they impact outcomes, with graphs. The results are impressive and get me to where I want to be, which is not actually to write my own or use his python 3-layer neural network, but rather to use pre-written python neural network libraries with a decent understanding of what goes on under the hood which I suspect is a good jump start. I also love the bit where he reverse engineers the trained network at the end to give a kind of insight into the brain of the network.
Profile Image for Lax.
6 reviews
June 8, 2022
# Neural Network: Some pieces


1 Perceptron
The neuron¡¯s input and output are converted to a function and its threshold is converted to a sigmoid shape of the function. This is a single-layer neural network with one node, also known as a perceptron.


2 A Multilayer Neural Network
More than one node(neuron) can be set in a layer, and a weighted connection between nodes can be set in the preceding and next layers. Data training can update the weights.


3 Matrix
Matrix is a suitable mathematical language for neural networks. Matrix multiplication allows us to get each layer¡¯s output [chap 1.7-1.9] and to backpropagate errors to any connection [chap 1.10-1.13]. Examples in this booklet are implemented by the simplest two- or three-layer neural network.


4 Gradient Descent
It is hard to give an exact solution of weights. A more practical method is gradient descent, that is, to take a small step in the direction where the slope is steepest downwards and to iterate the weights to its minimum.
This entire review has been hidden because of spoilers.
Profile Image for Evan Bonsignori.
55 reviews
November 29, 2017
Refreshing to read a difficult concept explained in such an easy to understand way.

Not once did I have to Google a concept since everything you need to know is provided.

Sure, there were some typos and other problems with this book. For instance, he put the calculus for gradient descent in the appendix while dedicating a section to matrix multiplication (which is more appropriate for the appendix since readers are more likely to know matrices than integral calculus).

Still, this book deserves five stars. It was fun enough that I was able to finish it in one sitting and found myself wanting more when it was over. I would highly recommend it to anyone interested in machine learning.
22 reviews
August 31, 2017
Wana know the basic theory and background of neural networks and deep learning with absolutely no background in CS? well look no further than this book. Tariq really outdone himself on presenting a complex subject in simple math and English even high school students can read and understand. He went straight for what neural networks are and what domain they dominate. But if you have any CS or programming background you will skim this book within hours and get all the basics straight. Well for me I would choose another book if I could, and I might look for other resources. But until then this book is a gold for those who just want to know what the fuzz is all about.
2 reviews
February 13, 2022
The book is an introduction to neural networks for very beginners. It explains the basic logics of neural networks and introduces the bare minimum knowledge needed of the Python programming language.

The author focuses mainly on providing the reader with an intuition of how these models are meant to work and shows an example application, coded in simple terms. However, there is no mention of more advanced NN techniques (e.g., CNNs or RNNs), nor deep learning frameworks (e.g., TensorFlow).

In conclusion, the book gives a good overview on the topic and its inner workings, but it is not enough to teach how to build a complex network to solve a novel problem.
5 reviews1 follower
January 27, 2018
Great intro into neural networks

The author laid out his plan to teach the basics in a hands on approach. The progression through the material was smooth and easy too make progress. A motivated, advanced middle school student could work thru the concepts and code with perhaps a little help if he/she gets stuck.
Excellent material for a science fair project.
Extending the code to save the machine "learning" so that it can be read in instead of relearned would be useful. Also automating the image ingestion/formatting would add a wow factor for a science project.
4 reviews
December 19, 2023
One of the easiest way to understand neural network

Thank you, Tariq for making it easier to understand the neural network. I loved the step by step approach from basic Km to mile conversion and calculating the conversion rate by trial/error (learning...), understanding what is matrics and why needed for neural network to implementing a neural network and using MNIST database to recognize handwritten digits. Infact, you made it very easy to understand calculus provided in the appendix section. Looking forward to reading
1 review
May 25, 2017
Excellent Introduction to Artificial Neural Networks

Highly recommend this book. The author makes the ANN concepts very clear and easy to follow. Readers should try to duplicate the book examples to get the maximum benefit from this book. I duplicated the MNIST demonstrations using a Raspberry PiI 3 and can positively state they all work as shown. My results were identical to those discussed by the author.

Again, highly recommended.
Profile Image for James Igoe.
98 reviews19 followers
July 3, 2017
The book itself can be painful to work through, as it is written for a novice, not just in algorithms and data analysis, but also in programming. For the neural network aspect, it jumped between overly simplistic and complicated, while providing neither in enough detail. That said, by the end I found it a worthwhile dive into neural networks, since once it got to the programming structure, it all made sense, but only because I stuck with it.
50 reviews1 follower
August 12, 2021
This is how a Computer Science book should be written. Well explained, not too short not too long, giving what you need in a friendly way that is waaaay better than any lecture you can get from your professors.

If you have a computer alongside and read/code simultaneously. This book will do wonders on you. It literally opened doors in my head.

Put a lot of numbers in columns and rows do some math magic and ta-daaa!! You now know if the picture you've sent is a cat or a dog. Isn't that lovely?
8 reviews
February 22, 2022
This book really helped me to actually understanding Backpropagation. Thanks a lot Tariq, you really wrote it down as simple as possible. In the end thats just it, you learn to understand and create very simple neural networks. For the price that is not really a lot, but still its everything. It can be a game changer for a person to just copy paste deep learning code, or to actually understand the very foundation everything in Deep Learning is based on.
Profile Image for Alvaro Aguirre.
2 reviews2 followers
December 6, 2017
Good introduction to Neural Networks. The Python section is nice, although someone that had never seen python before might struggle a bit. Concepts were well explained for non-tech backgrounds and it was a fast read. Leaves you with a decent understanding of the basics of a neural network. Would recommend it.
Profile Image for Vishwa Deepak.
Author?3 books10 followers
September 14, 2018
Deep dive into neural networks with so much ease

I have read very few (or none) books which explains the mathematics of neural networks keeping novices like me in mind. Author has meticulously broken down all the complexities into simple mathematical equations. I recommend this book to all the people who want to go beyond the black-box nature of deep learning.
48 reviews2 followers
October 22, 2018
Elegant introduction into neural networks where we end up with simple NN recognising hand-written numbers. And vice versa, in the last section we will see how trained NN "writes" numbers.

Also quite concise if we subtract code samples, formulas, drawings and two appendixes (calculus and Raspberry Pi) from the 222 short Kindle pages. Really worth it as a starting point into NN.
Profile Image for rebecca.
122 reviews5 followers
December 17, 2018
completely forgot to update this many months ago, but this book was great!! the theory section in particular was very informative & clear. the python section was good, particularly considering this isn't a book about python, and gave me a decent groundwork for using numpy which has since been quite useful for me on my physics course. would definitely recommend for super super beginners like me.
Profile Image for Anita.
12 reviews7 followers
February 18, 2019
This was the fastest I've ever read a book! In just two days I finished the whole book and actually understood the concept. The author is a genius! He takes a "complicated topic" such as a neural network, and describe it like it is a piece of cake. You would understand everything right away. For everyone that is just starting to learn machine learning, I totally recommend it!
Displaying 1 - 30 of 93 reviews

Can't find what you're looking for?

Get help and learn more about the design.