Complete Neural Network backward propagation algorithm.