Update back propagation algorithm.