Zero out the parameters of a module and return it.
(module)
| 49 | |
| 50 | |
| 51 | def zero_module(module): |
| 52 | """ |
| 53 | Zero out the parameters of a module and return it. |
| 54 | """ |
| 55 | for p in module.parameters(): |
| 56 | p.detach().zero_() |
| 57 | return module |
| 58 | |
| 59 | |
| 60 | class StylizationBlock(nn.Module): |