- Run
git clone https://github.com/travisty12/NeuralNet
from the console to download,cd NeuralNet
to enter the directory - To create a new net in the file, create a new instance of
Network
, with the size of the layers and a name as arguments, define training data, and run the SGD method with training data, number of epochs, batch size, learning coefficient, and test data as arguments. See the bottom ofNeuralNet.js
for an example. - To run from console and interact with the net after initialization, uncomment the
debugger
from the bottom ofNeuralNet.js
, and runnode inspect NeuralNet.js
. Runcont
until it hits thedebugger
line and runrepl
, at which point you can interact with the object, i.e.console.log(net.feedForward(dummyData));
- All concepts used in this program were learned from Michael Nielsen's book Neural Networks and Deep Learning, found here. This repo is just a translation of stochastic gradient descent concepts shown in the book in Python, into JavaScript, along with a second class built to handle tensor math (previously handled by NumPy)
- I understand that TensorFlow.js exists for this, but I just thought it would be a fun challenge to write the math and network creation myself!