(self, m)
| 128 | # self.apply(self._init_weights) |
| 129 | |
| 130 | def _init_weights(self, m): |
| 131 | if isinstance(m, nn.Linear): |
| 132 | trunc_normal_(m.weight, std=.02) |
| 133 | if isinstance(m, nn.Linear) and m.bias is not None: |
| 134 | nn.init.constant_(m.bias, 0) |
| 135 | elif isinstance(m, nn.LayerNorm): |
| 136 | nn.init.constant_(m.bias, 0) |
| 137 | nn.init.constant_(m.weight, 1.0) |
| 138 | |
| 139 | def forward(self, x, attn_mask=None): |
| 140 |
nothing calls this directly
no outgoing calls
no test coverage detected