Scale the parameters of a module and return it.
(module, scale)
| 207 | |
| 208 | |
| 209 | def scale_module(module, scale): |
| 210 | """ |
| 211 | Scale the parameters of a module and return it. |
| 212 | """ |
| 213 | for p in module.parameters(): |
| 214 | p.detach().mul_(scale) |
| 215 | return module |
| 216 | |
| 217 | |
| 218 | def mean_flat(tensor): |
nothing calls this directly
no outgoing calls
no test coverage detected