Im researching about MultiLayer Perceptrons, a kind of Neural Networks. When I read about Back Propagation Algorithm I see some authors suggest to update weights inmediately after we computed all errors for specific layer, but another authors explain we need to update weights after we get all errors for all layers. What are correct approach?
1st Approach:
function void BackPropagate(){
ComputeErrorsForOutputLayer();
UpdateWeightsOutputLayer();
ComputeErrorsForHiddenLayer();
UpdateWeightsHiddenLayer();
}
2nd Approach:
function void BackPropagate(){
ComputeErrorsForOutputLayer();
ComputeErrorsForHiddenLayer();
UpdateWeightsOutputLayer();
UpdateWeightsHiddenLayer();
}
Thanks for everything.