I also believe that the separate loop for details explaination is better than combined loop, which is more clear about how weights and gradients updated.