def button0clicked(self): input = x.adjust("test.jpg").reshape((1, net.IN_NUM)) temp = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0] inputs = list(input[0]) inputs.extend(temp) n = net.neuralnetwork(net.IN_NUM, net.HIDE_NUM, net.OUT_NUM) n.train(inputs, net.MIU, net.FOR_TIMES, net.ERRON_CHANGE) self.edit.append("ok!!")
def __init__(self): self.NN = neuralnetwork(11) self.database = random_stack(length=1000, clear_size=100)