(self)
| 399 | |
| 400 | |
| 401 | def apply_weight_norm(self): |
| 402 | def _apply_weight_norm(m): |
| 403 | if isinstance(m, nn.Conv1d) or isinstance( |
| 404 | m, nn.ConvTranspose1d |
| 405 | ): |
| 406 | nn.utils.parametrizations.weight_norm(m) |
| 407 | |
| 408 | self.apply(_apply_weight_norm) |
| 409 | |
| 410 | |
| 411 | def remove_weight_norm(self): |