(module)
| 382 | |
| 383 | # Initialize transformer layers: |
| 384 | def _basic_init(module): |
| 385 | if isinstance(module, nn.Linear): |
| 386 | torch.nn.init.xavier_uniform_(module.weight) |
| 387 | if module.bias is not None: |
| 388 | nn.init.constant_(module.bias, 0) |
| 389 | self.apply(_basic_init) |
| 390 | |
| 391 | # Initialize patch_embed like nn.Linear (instead of nn.Conv2d): |
nothing calls this directly
no outgoing calls
no test coverage detected