(self, module)
| 285 | self.apply(self._init_weights) |
| 286 | |
| 287 | def _init_weights(self, module): |
| 288 | if isinstance(module, (nn.Linear, nn.Embedding)): |
| 289 | torch.nn.init.normal_(module.weight, mean=0.0, std=0.02) |
| 290 | if isinstance(module, nn.Linear) and module.bias is not None: |
| 291 | torch.nn.init.zeros_(module.bias) |
| 292 | elif isinstance(module, nn.LayerNorm): |
| 293 | torch.nn.init.zeros_(module.bias) |
| 294 | torch.nn.init.ones_(module.weight) |
| 295 | |
| 296 | def enc_only_forward(self, states, goals, sigma): |
| 297 |
nothing calls this directly
no outgoing calls
no test coverage detected