MCPcopy Create free account
hub / github.com/DSL-Lab/StreamSplat / forward

Method forward

model/transformer_utils.py:372–374  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

370 self.register_buffer('pe', pe)
371
372 def forward(self, x):
373 seq_len = x.size(1)
374 return self.pe[:seq_len, :].unsqueeze(0)
375
376class Transformer(nn.Module):
377 def __init__(self, width, layers, heads, window_size=None, block_cls=ResAttBlock, drop_path_rate=0.0):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected