A backpropagation algorithm for a neural network