train_y = nnet.label_vectors(train_labels, 10)
for i in range(100):
for batch in range(0, num_train, nnet_batch):
- cost = nnet.train(net, train_images[:, batch:(batch + nnet_batch)], train_y[:, batch:(batch + nnet_batch)], learning_rate=1)
+ cost = nnet.train(net, train_images[:, batch:(batch + nnet_batch)], train_y[:, batch:(batch + nnet_batch)], learning_rate=(100-i)/100)
print(f'cost after training round {i}: {cost}')
print(f'correctly recognized images after training: {nnet.accuracy(net, test_images, test_labels)}%')