Scale the parameters of a module and return it.
(module, scale)
| 181 | |
| 182 | |
| 183 | def scale_module(module, scale): |
| 184 | """ |
| 185 | Scale the parameters of a module and return it. |
| 186 | """ |
| 187 | for p in module.parameters(): |
| 188 | p.detach().mul_(scale) |
| 189 | return module |
| 190 | |
| 191 | |
| 192 | def mean_flat(tensor): |
nothing calls this directly
no outgoing calls
no test coverage detected