out_proj.weight which is previously initilized in VSSBlock, would be cleared in nn.Linear no fc.weight found in the any of the model parameters no nn.Embedding found in the any of the model parameters so the thing is, VSSBlock initialization is useless Conv2
(self, m: nn.Module)
| 764 | self.apply(self._init_weights) |
| 765 | |
| 766 | def _init_weights(self, m: nn.Module): |
| 767 | """ |
| 768 | out_proj.weight which is previously initilized in VSSBlock, would be cleared in nn.Linear |
| 769 | no fc.weight found in the any of the model parameters |
| 770 | no nn.Embedding found in the any of the model parameters |
| 771 | so the thing is, VSSBlock initialization is useless |
| 772 | |
| 773 | Conv2D is not intialized !!! |
| 774 | """ |
| 775 | if isinstance(m, nn.Linear): |
| 776 | trunc_normal_(m.weight, std=.02) |
| 777 | if isinstance(m, nn.Linear) and m.bias is not None: |
| 778 | nn.init.constant_(m.bias, 0) |
| 779 | elif isinstance(m, nn.LayerNorm): |
| 780 | nn.init.constant_(m.bias, 0) |
| 781 | nn.init.constant_(m.weight, 1.0) |
| 782 | |
| 783 | @torch.jit.ignore |
| 784 | def no_weight_decay(self): |
nothing calls this directly
no outgoing calls
no test coverage detected