Backpropagation from scratch with Python