(module: nn.Module)
| 663 | |
| 664 | if True: # is this really applied? Yes, but been overriden later in VSSM! |
| 665 | def _init_weights(module: nn.Module): |
| 666 | for name, p in module.named_parameters(): |
| 667 | if name in ["out_proj.weight"]: |
| 668 | p = p.clone().detach_() # fake init, just to keep the seed .... |
| 669 | nn.init.kaiming_uniform_(p, a=math.sqrt(5)) |
| 670 | |
| 671 | self.apply(_init_weights) |
| 672 |
nothing calls this directly
no outgoing calls
no test coverage detected