Here is my code:
trainingSet = {"0,0":0, "1,0":1, "2,0":1, "0,1":0, "1,1":1, "1,2":0, "2,0":0, "2,1":0, "2,2":1}
for k,expectedOutput in trainingSet.iteritems():
print 1
coordinates = k.split(",")
network.layers[0].neurons[0].value = float(coordinates[0])
network.layers[0].neurons[1].value = float(coordinates[1])
output = network.calculateOutput()
The output is:
1
1
1
1
1
1
1
1
# 8 lines
How is that possible? There are 9 items in the trainingSet dictionary. Shouldn't the output be:
1
1
1
1
1
1
1
1
1
# 9 lines