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