Released today! Our newest video programming tutorial, A Neural Net Simulator in C++, is now available for your viewing pleasure at the following link:
[ Update for 2013: Also see the new companion video for visualizations of how neural nets work and how to train them: The Care and Training of Your Backpropagation Neural Net. ]
If you’re a beginning to intermediate C++ programmer, this tutorial will guide you through the analysis, design, and coding of a command line console program that implements a neural net in C++. You’ll end up with a classic back propagation model with adjustable gradient descent learning and adjustable momentum. You’ll see how to teach your neural net to solve a simple task, then you can supply your own training data to train your net to do wonderful and amazing things.
Besides showing how a neural net works, we also discuss:
- C++ class design
- prototyping with portable C++
- test early, test often
- encapsulation, data hiding
- static class members
- accessor functions
- const correctness
- the assert() macro
- the vector<> template container, and .size(), .back(), and .push_back() member functions
- reference variables
This tutorial does not cover or require exception handling, memory management, STL iterators, inheritance, threads, or graphical input or output.
The finished neural net source code is also available for download here (see the video for instructions on what to do with it):
- http://inkdrop.net/dave/docs/neural-net-tutorial.cpp (with *nix line endings)
- http://inkdrop.net/dave/docs/neural-net-tutorial-W.cpp (with DOS line endings)
The comment form is disabled because of the amount of spam we’re receiving. To post a comment, send email to dave at millermattson.com.