Line 20 of algorithm 11 should be outside of the for loop that starts in line 8. Otherwise, the weights will be updated before all the gradients are computed.
It will also need new a loop over the layers and this may be to big to fit. We should think in general how to express these. Maybe just focus on the batch update.
Line 20 of algorithm 11 should be outside of the for loop that starts in line 8. Otherwise, the weights will be updated before all the gradients are computed.