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

Method forward

models/layers.py:13–17  ·  view source on GitHub ↗
(self, x_seq: torch.Tensor)

Source from the content-addressed store, hash-verified

11 self.module = nn.Sequential(*args)
12
13 def forward(self, x_seq: torch.Tensor):
14 y_shape = [x_seq.shape[0], x_seq.shape[1]]
15 y_seq = self.module(x_seq.flatten(0, 1).contiguous())
16 y_shape.extend(y_seq.shape[1:])
17 return y_seq.view(y_shape)
18
19
20class SpikeModule(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected