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

Method with_pos_embed

semantic_sam/body/decoder/modules.py:154–155  ·  view source on GitHub ↗
(self, tensor, pos: Optional[Tensor])

Source from the content-addressed store, hash-verified

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
156
157 def forward_post(self, tgt):
158 tgt2 = self.linear2(self.dropout(self.activation(self.linear1(tgt))))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected