0
This error comes after the upgrade of my PyTorch version from 1.8 to 1.9.0.
When using this line:
from torch.autograd.gradcheck import zero_gradients, I get this error message: ImportError: cannot import name 'zero_gradients' from 'torch.autograd.gradcheck'
The command:
zero_gradients(im)
is used.
What is the new command equivalent in PyTorch 1.9.0?