def train(net, train_data, alpha, epoch):
    for curr_epoch_no in range(epoch):
        sums = 0
        sample_no = 0
        acc_cnt = 0
        for sample in train_data:
            outputs = feed_fwd(net, sample[0])
            expected = sample[1]
            sums += sum([((expected[i] - outputs[i]) ** 2) for i in range(len(expected))])
            if expected.index((max(expected) == outputs.index(max(outputs)))):
                acc_cnt += 1
            back_prop(net, expected)
            update_weights(net, sample[0], alpha)
        print('epoch_no:', curr_epoch_no, 'loss:', sums, 'accuracy:', acc_cnt)
def train(net, train_data, alpha, epoch):
    for curr_epoch_no in range(epoch):
        sums = 0
        sample_no = 0
        acc_cnt = 0
        for sample in train_data:
            outputs = feed_fwd(net, sample[0])
            expected = sample[1]
            sums += sum([((expected[i] - outputs[i]) ** 2) for i in range(len(expected))])
            if expected.index((max(expected) == outputs.index(max(outputs)))):
                acc_cnt += 1
            back_prop(net, expected)
            update_weights(net, sample[0], alpha)
        print('epoch_no:', curr_epoch_no, 'loss:', sums, 'accuracy:', acc_cnt)