Commit 55c54d7
Fix "to_standard_module" for Ghost Clipping (meta-pytorch#754)
Summary:
Issue [meta-pytorch#749](meta-pytorch#749)
Under FGC, we use ``del p.grad_sample`` to release used per-sample gradients. However, when running ``to_standard_module``, w/o new changes, it will lead to attribute not found errors.
Reviewed By: iden-kalemaj
Differential Revision: D740196951 parent cbc12de commit 55c54d7
File tree
2 files changed
+11
-9
lines changed- opacus
- grad_sample
- tests
2 files changed
+11
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
131 | 136 | | |
132 | 137 | | |
133 | 138 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 139 | + | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
144 | 143 | | |
145 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| |||
0 commit comments