This mini-book will take you step-by-step through coding your own neural network. This version uses Python, whereas the previous version used C++. I’ve launched this update because people didn’t like my coding approach in the previous edition (although the book itself has been pretty popular). Once you have mastered the steps, it should be easy enough to translate your knowledge into most other languages.

IMPORTANT: This mini-book goes step by step through the development of a relatively simple 3-layer back-propagation neural network to solve the exclusive OR problem. The purpose is to explain the concepts from a code-literate standpoint. This book uses a single example using a sigmoid function (only), and does not contain information on bias weights nor momentum. The purpose of this book is to explain the concept of neural networks to someone who understands coding but has no other training in the subject. I use a single example with built-in (magic) numbers and global variables in order to make the example clear (without confounding details). This is not production code. If you already understand how neural networks work, please do not buy this book.

There are lots of text-heavy and math-heavy explanations of how neural networks work, but few code-centric explanations. The exclusive OR problem is a good example because this cannot be solved with a single-layer neural network. If you are a coder, the explanations should make sense to you. No explanations of Python syntax are given, so this is not for the novice programmer. This book is not for the purist or the researcher, it’s an introductory book for people who want a basic understanding of how neural networks work.

With that said, I feel confident that if you spend a few hours going through this tutorial, you will gain a solid knowledge of the mechanics of back-propagation neural networks. If you want a copy of the source code, follow the instructions towards the end of this mini-book. However, I believe that you’re better off typing it in as you go – you will understand it better that way.

Once you’ve walked through this tutorial, you can start to code your own for your own work, or, having a better understanding of how they work, use one of the many open source or commercial neural network building tools.

Please note: It’s very hard to get program code to display properly in an e-format; I’ve done the best I can. If reading this as an e-book, I suggest that you read most of this book in landscape mode to keep the code from wrapping strangely.

Click here
to order

If you have a comment or a question about this book, or if you already own the book and wish to get a copy of the source code, please click here.