mparker3 / cppNeuralNet

Implemented a neural net in C++. Based off of @miloharper 's blog post: https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1#.hjy9dav7z

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Neural Net written in C++

Wanted to pass some time on a flight, prepare for an upcoming AI class, and keep my c++ sharp, so I decided to try my hand at implementing a simple XOR gate using a neural network.

Based on @miloharper's fantastic tutorial on Medium.

This project presented some fun challenges with "translation" from Python. I found that working in c++ required a greater understanding of the matrices and mathematics powering the neural net, because of the language's static, explicitly declared types.


Next steps:

  1. Implement the next post in the series, a tutorial for a layered neural net.
  2. Refactor my code ..* There are a lot of syntactically similar functions in the "train" member function, so it might be worth it to write a replacement function and pass the original functions in as parameters.

About

Implemented a neural net in C++. Based off of @miloharper 's blog post: https://medium.com/technology-invention-and-more/how-to-build-a-simple-neural-network-in-9-lines-of-python-code-cc8f23647ca1#.hjy9dav7z


Languages

Language:C++ 100.0%