You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three layer neural network (I-H-H-O) with tanh activation function in the hidden layers and softmax cross-entropy in the output layer.
Implementing a multi-layer perceptron to solve the two-spiral problem
This utilizes a three-layer neural network (2 hidden layers with tanh and 1 output layer with softmax) to solve the two-spiral problem.
Included in this gist is data_utils.py which has the method load_twin_spiral() in order to generate the data. All of the computations in the neural network (feedforward and backpropagation) are done using the numpy package.
Usage
If you wish to use the classes in this gist, simply import the module network and load the class:
If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:
We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav