MCPcopy Create free account
hub / github.com/drinkingcoder/FlowFormer-Official / forward

Method forward

core/position_encoding.py:31–36  ·  view source on GitHub ↗

Args: x: [N, C, H, W]

(self, x)

Source from the content-addressed store, hash-verified

29 self.register_buffer('pe', pe.unsqueeze(0)) # [1, C, H, W]
30
31 def forward(self, x):
32 """
33 Args:
34 x: [N, C, H, W]
35 """
36 return x + self.pe[:, :, :x.size(2), :x.size(3)]
37
38class LinearPositionEncoding(nn.Module):
39 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected