MCPcopy Create free account
hub / github.com/lingeringlight/START / _init_weights

Method _init_weights

models/vmamba.py:665–669  ·  view source on GitHub ↗
(module: nn.Module)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected