Multi Hidden Layer Support (another proposal)
I refactoried the entire nn.js code.
NO CONFLICTS
Please, do not hesitate to improve! Reference: #61 EXAMPLE: https://maksuel.github.io/Toy-Neural-Network-JS/examples/doodle_classification/ (the example use 2 hidden layers)
/**
- Constructor method.
- The user can enter with parameters (integer) to create a new NeuralNetwork,
- where: the first parameter represents the number of inputs, the second
- (or more) parameter represents the number of hidden nodes and the last
- parameter represents the number of outputs of the network.
- The user can copy an instance of NeuralNetwork by passing the same as an
- argument to the constructor.
- @param {NeuralNetwork|...Integer} args (Rest parameters) */
We would like to integrate something like this hopefully in the near future. Dan would like to do a little bit more in his streams with the simplified network first.
I'm curious why you chose to store the weights in a separate array instead of storing them in the layer objects.
Vesatilus,
I was looking for a more semantic way to store the variables. That was the beginning of code refactoring. I just updated the project in the most semantic way I found, made it easier to read the methods and reduce the amount of loops.