commit 1a5e352c099fe7d5d280850f35ff64727631d815 Author: Your Name Date: Sun Jun 9 17:40:23 2019 +0200 done diff --git a/NeuralNetwork.js b/NeuralNetwork.js new file mode 100755 index 0000000..c8d2667 --- /dev/null +++ b/NeuralNetwork.js @@ -0,0 +1,162 @@ +class NeuralNetwork +{ + constructor(numInputs, numOutputs, numHiddenLayers, numNeuronsPerHiddenLayer) + { + + this.numInputs = numInputs; + this.numOutputs = numOutputs; + this.numHiddenLayers = numHiddenLayers; + this.numNeuronsPerHiddenLayer = numNeuronsPerHiddenLayer; + + this.bias = 0.0; + this.activationResponse = 1.0; + this.neuronLayers = []; + + this.createNetwork(); + } + + createNetwork() + { + + //create the layers of the network + if (this.numHiddenLayers > 0) + { + //create first hidden layer + var firstHiddenLayer = new NeuronLayer(this.numNeuronsPerHiddenLayer, this.numInputs); + this.neuronLayers.push(firstHiddenLayer); + + for (var i=0; i + + + + + + + + + + +
+
+ + + +

+ +

+
+
+ +

+ +



+ +

+ +



+ +

+ +

+
+
+ +

+ +

+ +



+ +

+ +

+ +

+
+ +
+ + + +

+
+
+ + +