(self, m)
| 537 | self.apply(self._init_weights) |
| 538 | |
| 539 | def _init_weights(self, m): |
| 540 | if isinstance(m, nn.Linear): |
| 541 | # init.kaiming_uniform_(m.weight) |
| 542 | m.weight.data = truncated_normal_(m.weight.data) |
| 543 | if isinstance(m, nn.Linear) and m.bias is not None: |
| 544 | init.zeros_(m.bias) |
| 545 | elif isinstance(m, nn.LayerNorm): |
| 546 | init.zeros_(m.bias) |
| 547 | init.ones_(m.weight) |
| 548 | elif isinstance(m, nn.Conv2d): |
| 549 | init.kaiming_uniform_(m.weight) |
| 550 | |
| 551 | def forward_features(self, x): |
| 552 | x = self.patch_embed(x) |
nothing calls this directly
no test coverage detected