Commit 7555297
Remove presence of grad_sample from optimizer for FGC (#756)
Summary:
Pull Request resolved: #756
In case of FGC, grad_samples is set to None in the backward hook after computing the norm per layer. There is no need to set p.grad_samples to None in the optimizer.
Reviewed By: EnayatUllah
Differential Revision: D74418221
fbshipit-source-id: 0f91288e0839d35887e5ec6add36fc3baf89dd851 parent 4acea9f commit 7555297
File tree
2 files changed
+4
-6
lines changed- opacus
- grad_sample
- optimizers
2 files changed
+4
-6
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
| 129 | + | |
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | 148 | | |
151 | 149 | | |
152 | 150 | | |
| |||
0 commit comments