Train neural network with backpropagation algorithm