(module)
| 65 | |
| 66 | def init_weights(self, add_constant: bool = False): |
| 67 | def basic_init(module): |
| 68 | if isinstance(module, nn.Linear): |
| 69 | nn.init.xavier_uniform_(module.weight) |
| 70 | if module.bias is not None: |
| 71 | nn.init.constant_(module.bias, 0) |
| 72 | self.apply(basic_init) |
| 73 | |
| 74 | # For no pre-optimized training, you should consider use the following init |
nothing calls this directly
no outgoing calls
no test coverage detected