MCPcopy Create free account
hub / github.com/BorealisAI/scaleformer / forward

Method forward

layers/Embed.py:52–53  ·  view source on GitHub ↗
(self, x, scale=1)

Source from the content-addressed store, hash-verified

50 self.register_buffer('pe', pe)
51
52 def forward(self, x, scale=1):
53 return self.pe[:, scale:x.size(1)*scale+1:scale]
54
55class TokenEmbedding(nn.Module):
56 def __init__(self, c_in, d_model):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected