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

Method position_encoding

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

Source from the content-addressed store, hash-verified

30 self.subsampling_rate = 1
31
32 def position_encoding(self, offset: Union[int, torch.Tensor],
33 size: int) -> torch.Tensor:
34 return self.pos_enc.position_encoding(offset, size)
35
36
37class EmbedinigNoSubsampling(BaseSubsampling):

Callers 7

forward_chunkMethod · 0.45
forward_chunkMethod · 0.45
position_encodingMethod · 0.45
forward_chunkMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45
forwardMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected