Commit 24bb876
reduce logging severity for set_to_none (#471)
Summary:
We want to warn users of an unexpected behaviour with `set_to_none` flag. Normally, both `nn.Module` and `Optimizer` let clients choose whether they want to remove the `.grad` attribute altogether or just set it to None.
We, on the other hand, don't want to remove the attributes - it's more convenient to assume the `.grad_sample` attribute is always present. It's not an absolute requirement, but we did that historically and I don't see a case for changing it now.
However, default value for `set_to_none` is False, meaning most users are getting annoying logging notifications on every training step.
Pull Request resolved: #471
Reviewed By: karthikprasad
Differential Revision: D38741747
Pulled By: ffuuugor
fbshipit-source-id: e77c4ec90c7aa70866d2f073034bd2fd2c27c4761 parent dd53ccc commit 24bb876
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
| 465 | + | |
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| |||
0 commit comments