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

Method forward

core/position_encoding.py:62–69  ·  view source on GitHub ↗

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

(self, x)

Source from the content-addressed store, hash-verified

60 self.register_buffer('pe', pe.unsqueeze(0), persistent=False) # [1, C, H, W]
61
62 def forward(self, x):
63 """
64 Args:
65 x: [N, C, H, W]
66 """
67 # assert x.shape[2] == 80 and x.shape[3] == 80
68
69 return x + self.pe[:, :, :x.size(2), :x.size(3)]
70
71class LearnedPositionEncoding(nn.Module):
72 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected