This blog entry is based on Siraj Raval's YouTube video called Build a Neural Net in 4 Minutes

I translated the python code there into C# on this github page. The code is written as test but you can easily turn it into command line by moving the code from Run method into the Main static method of console application.

While the python code involves implicit matrix operations that are happening in hidden black boxes in this example all the matrix logic is implemented as extension methods and are on the same page in a static class named SimpleNeuralNetExtensions

One interesting fact is that on Windows .NET code runs 3 times faster than the analogous Python code. Not quite sure why. I would expect it to be the opposite assuming numpy is mostly C code...

Share this post:   digg     Stumble Upon     E-mail

Commenting temporarily disabled