title: Why do we need to call zero_grad() in PyTorch?
body: <p>Why does <a href="https://pytorch.org/docs/stable/generated/torch.optim.Optimizer.zero_grad.html" rel="noreferrer"><code>zero_grad()</code></a> need to be called during training?</p>
  <pre><code>|  zero_grad(self)
  |      Sets gradients of all model parameters to zero.
  </code></pre>