MCPcopy Create free account
hub / github.com/ASLP-lab/OSUM / position_encoding

Method position_encoding

OSUM/wenet/transformer/embedding.py:196–198  ·  view source on GitHub ↗
(self, offset: Union[int, torch.Tensor],
                          size: int)

Source from the content-addressed store, hash-verified

194 return self.dropout(x), pos_emb
195
196 def position_encoding(self, offset: Union[int, torch.Tensor],
197 size: int) -> torch.Tensor:
198 return torch.zeros(1, size, self.d_model)
199
200
201class RopePositionalEncoding(PositionalEncoding):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected