MCPcopy Create free account
hub / github.com/Intelligent-Computing-Lab-Panda/NDA_SNN / SpikeModule

Class SpikeModule

models/layers.py:20–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19
20class SpikeModule(nn.Module):
21
22 def __init__(self, module):
23 super().__init__()
24 self.ann_module = module
25
26 def forward(self, x):
27 B, T, *spatial_dims = x.shape
28 out = self.ann_module(x.reshape(B * T, *spatial_dims))
29 BT, *spatial_dims = out.shape
30 out = out.view(B, T, *spatial_dims).contiguous()
31 return out
32
33
34def fire_function(gamma):

Callers 1

make_layersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected