diff --git a/short_version.py b/short_version.py index 5ba57b9..6741cbf 100644 --- a/short_version.py +++ b/short_version.py @@ -4,6 +4,6 @@ random.seed(1) synaptic_weights = 2 * random.random((3, 1)) - 1 for iteration in xrange(10000): - output = 1 / (1 + exp(-(dot(training_set_inputs, synaptic_weights)))) + output = 1 / (1 + exp(-(dot(training_set_inputs, synaptic_weights)))) # sigmoid function synaptic_weights += dot(training_set_inputs.T, (training_set_outputs - output) * output * (1 - output)) print 1 / (1 + exp(-(dot(array([1, 0, 0]), synaptic_weights))))