(m)
| 651 | """ |
| 652 | |
| 653 | def _init_weights(m): |
| 654 | if isinstance(m, nn.Linear): |
| 655 | trunc_normal_(m.weight, std=0.02) |
| 656 | if isinstance(m, nn.Linear) and m.bias is not None: |
| 657 | nn.init.constant_(m.bias, 0) |
| 658 | elif isinstance(m, nn.LayerNorm): |
| 659 | nn.init.constant_(m.bias, 0) |
| 660 | nn.init.constant_(m.weight, 1.0) |
| 661 | |
| 662 | |
| 663 | def load_weights(self, pretrained_dict=None, pretrained_layers=[], verbose=True): |
nothing calls this directly
no outgoing calls
no test coverage detected