pytorch
b90496ee - [nn] zero_grad() set_to_none default True (#92731)

Commit
1 year ago
[nn] zero_grad() set_to_none default True (#92731) Attempts to fix #92656 BC-breaking! This changes the default of zero_grad in optim and in nn to default set grads to None instead of zero tensors. We are changing the default because there are proven perf wins and existing code has typically not regressed due to this change. (will probably have to flesh out this note more). Pull Request resolved: https://github.com/pytorch/pytorch/pull/92731 Approved by: https://github.com/ngimel
Author
Committer
Parents
Loading