Zero out the parameters of a module and return it.
(module)
| 17 | |
| 18 | |
| 19 | def zero_module(module): |
| 20 | """ |
| 21 | Zero out the parameters of a module and return it. |
| 22 | """ |
| 23 | for p in module.parameters(): |
| 24 | p.detach().zero_() |
| 25 | return module |
| 26 | |
| 27 | |
| 28 | class LatentTransparencyOffsetEncoder(torch.nn.Module): |