Scale the parameters of a module and return it.
(module, scale)
| 75 | |
| 76 | |
| 77 | def scale_module(module, scale): |
| 78 | """ |
| 79 | Scale the parameters of a module and return it. |
| 80 | """ |
| 81 | for p in module.parameters(): |
| 82 | p.detach().mul_(scale) |
| 83 | return module |
| 84 | |
| 85 | |
| 86 | def mean_flat(tensor): |
nothing calls this directly
no outgoing calls
no test coverage detected