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

Method forward

semantic_sam/body/decoder/modules.py:59–67  ·  view source on GitHub ↗
(self, tgt,
                tgt_mask: Optional[Tensor] = None,
                tgt_key_padding_mask: Optional[Tensor] = None,
                query_pos: Optional[Tensor] = None)

Source from the content-addressed store, hash-verified

57 return tgt
58
59 def forward(self, tgt,
60 tgt_mask: Optional[Tensor] = None,
61 tgt_key_padding_mask: Optional[Tensor] = None,
62 query_pos: Optional[Tensor] = None):
63 if self.normalize_before:
64 return self.forward_pre(tgt, tgt_mask,
65 tgt_key_padding_mask, query_pos)
66 return self.forward_post(tgt, tgt_mask,
67 tgt_key_padding_mask, query_pos)
68
69
70class CrossAttentionLayer(nn.Module):

Callers

nothing calls this directly

Calls 2

forward_preMethod · 0.95
forward_postMethod · 0.95

Tested by

no test coverage detected