
snntorch_sconv2dlstm_event
Spiking networks24 ops10.4K params
A convolutional LSTM cell whose membrane state fires spikes, one time step per call, from snntorch.
Spiking networks · 24 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
About this model's family
SConv2dLSTM is snntorch's spiking 2d convolutional long short-term memory cell: its hidden states are membrane potential and synaptic current, mem and syn, which correspond to the hidden and cell states h and c in the original LSTM formulation. Where a standard LSTM multiplies by weight matrices, this cell applies 2D cross-correlation in its gate equations, with the Hadamard product for the state mixing. The output state is then thresholded to determine whether an output spike is generated.
Unlike the LSTM module in PyTorch, only one time step is simulated each time the cell is called, so a sequence is run by looping outside the cell. Both captured members are single cells with 2 input channels and 16 output channels on a 32 by 32 frame, stepped once and returning the spike, synaptic current and membrane tensors. To conform to standard LSTM state behavior, the default reset mechanism is none, so no reset is applied after a spike unless you change it. At the moment a stride other than 1 is not supported.
Key idea. An LSTM cell whose gates are convolutions and whose membrane output is thresholded into spikes, a convolutional recurrent unit for spiking networks.
AI-written summary, based on the model's documentation and checked automatically against it; not reviewed by a person. Corrections welcome.