MCPcopy Create free account
hub / github.com/bic-L/MaxFormer / forward

Method forward

event/embedding_hub.py:37–49  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

35 self.shortcut = shortcut
36
37 def forward(self, x):
38 #input : T, B, C, H, W
39
40 if self.shortcut is False:
41 x = self.embed_lif(x)
42 x_feat = x
43
44 x = self.embed_conv(x.flatten(0, 1).contiguous())
45 x = self.embed_bn(x)
46 x = self.maxpool(x)
47
48 #output : T*B, C, H, W
49 return x, x_feat
50
51class Avg_Embed(nn.Module):
52 def __init__(self, in_channels=2, out_channels=256, kernel_size = 3, stride = 1, padding = 1, shortcut= False):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected