Recurrent layer class#

1D Recurrent layer class#

class src.model.SpikingLayer.Recurrent1d(output_dim: int)#

Bases: Module

Class that implements 1D-recurrent connections layer.

forward(output_spikes: Tensor)#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#

2D Recurrent layer class#

class src.model.SpikingLayer.Recurrent2d(output_channels: int)#

Bases: Module

Class that implements 2D-recurrent connections layer.

forward(output_spikes)#

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

training: bool#