Scale the parameters of a module and return it.
(module, scale)
| 104 | |
| 105 | |
| 106 | def scale_module(module, scale): |
| 107 | """ |
| 108 | Scale the parameters of a module and return it. |
| 109 | """ |
| 110 | for p in module.parameters(): |
| 111 | p.detach().mul_(scale) |
| 112 | return module |
| 113 | |
| 114 | |
| 115 | def mean_flat(tensor): |
nothing calls this directly
no outgoing calls
no test coverage detected