Zero out the parameters of a module and return it.
(module)
| 95 | |
| 96 | |
| 97 | def zero_module(module): |
| 98 | """ |
| 99 | Zero out the parameters of a module and return it. |
| 100 | """ |
| 101 | for p in module.parameters(): |
| 102 | p.detach().zero_() |
| 103 | return module |
| 104 | |
| 105 | |
| 106 | def scale_module(module, scale): |
nothing calls this directly
no outgoing calls
no test coverage detected