I am a freshman in pytorch, and I want to know whether the two method below equal to each other.




batch size == 2 and the loss is calculated by the model, then call loss.backwards.




batch size == 1 and the loss is calculated every two step, then call loss.backwards.