In [1]:
import numpy as np
import network
import random
net = network.Network([2,1,1])
train_nand = np.array([((1,1), 0), ((1,0), 1), ((0,1) ,1), ((0,0) ,1)])

In [2]:
net.SGD(train_nand, epochs=7, mini_batch_size=4, eta=1, test_data=train_nand)


Training data as this point:
[[(1, 1) 0]
 [(1, 0) 1]
 [(0, 1) 1]
 [(0, 0) 1]]
Epoch 0: 1 / 4
Training data as this point:
[[(1, 1) 0]
 [(1, 0) 1]
 [(1, 0) 1]
 [(0, 0) 1]]
Epoch 1: 2 / 4
Training data as this point:
[[(1, 1) 0]
 [(1, 1) 0]
 [(1, 0) 1]
 [(0, 0) 1]]
Epoch 2: 3 / 4
Training data as this point:
[[(1, 1) 0]
 [(1, 1) 0]
 [(1, 1) 0]
 [(1, 0) 1]]
Epoch 3: 3 / 4
Training data as this point:
[[(1, 1) 0]
 [(1, 1) 0]
 [(1, 1) 0]
 [(1, 0) 1]]
Epoch 4: 4 / 4
Training data as this point:
[[(1, 1) 0]
 [(1, 1) 0]
 [(1, 1) 0]
 [(1, 1) 0]]
Epoch 5: 4 / 4
Training data as this point:
[[(1, 1) 0]
 [(1, 1) 0]
 [(1, 1) 0]
 [(1, 1) 0]]
Epoch 6: 4 / 4