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

Method __init__

event/embedding_hub.py:27–35  ·  view source on GitHub ↗
(self, in_channels=2, out_channels=256, kernel_size = 3, stride = 1, padding = 1, shortcut= False)

Source from the content-addressed store, hash-verified

25
26class Max_Embed(nn.Module):
27 def __init__(self, in_channels=2, out_channels=256, kernel_size = 3, stride = 1, padding = 1, shortcut= False):
28 super().__init__()
29
30 self.embed_lif = MultiStepLIFNode(tau=2.0, detach_reset=True, backend='cupy')
31 self.embed_conv = nn.Conv2d(in_channels, out_channels, kernel_size=kernel_size, stride=stride, padding=padding, bias=False)
32 self.embed_bn = nn.BatchNorm2d(out_channels)
33 self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=1, dilation=1, ceil_mode=False)
34
35 self.shortcut = shortcut
36
37 def forward(self, x):
38 #input : T, B, C, H, W

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected