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