In another tutorial on PyTorch’s autograd engine, I saw that after updating the weights, the gradients are set to zero with my_tensor.grad.zero_() or they are just replaced by None. Is this also necessary in my example above? I would be very happy if you could give me an answer to this.