Zero out the parameters of a module and return it.
(module)
| 77 | |
| 78 | |
| 79 | def zero_module(module): |
| 80 | """ |
| 81 | Zero out the parameters of a module and return it. |
| 82 | """ |
| 83 | for p in module.parameters(): |
| 84 | p.detach().zero_() |
| 85 | return module |
| 86 | |
| 87 | |
| 88 | def Normalize(in_channels): |