Solved by imaluengo in post #4 
              
              
                To the first question, yes you can. Everytime you call loss.backward() it accumulates gradients in the network. They actually only get processed when you call optimizer.step(), at the end of the loop. 
You can only do this since your optimizer.zero_grad() is outside of the loop, once per epoch. If z…