MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / _reset_parameters

Method _reset_parameters

semantic_sam/body/decoder/modules.py:149–152  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

147 self._reset_parameters()
148
149 def _reset_parameters(self):
150 for p in self.parameters():
151 if p.dim() > 1:
152 nn.init.xavier_uniform_(p)
153
154 def with_pos_embed(self, tensor, pos: Optional[Tensor]):
155 return tensor if pos is None else tensor + pos

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected