opacus
opacus copied to clipboard
Missing zero_grad in text classifier tutorial
The building_text_classifier.ipynb tutorial never calls optimizer.zero_grad(). The accumulated gradients should be zeroed after a step is taken.
zero_grad is not needed for opacus. Please see https://github.com/pytorch/opacus/pull/96
for more details