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.
If you wish to use the classes in this gist, simply import the module network
and load the class:
from network import *
from data_utils import *