No, forward doesn’t calculate gradients.
I don’t know what you mean by populate, do you mean propagate? loss.backward() does the back propagation, and compute all the gradients for the network weights.