class sinabs.layers.LIFSqueeze(batch_size=None, num_timesteps=None, **kwargs)[source]#

LIF layer with 4-dimensional input (Batch*Time, Channel, Height, Width).

Same as parent LIF class, only takes in squeezed 4D input (Batch*Time, Channel, Height, Width) instead of 5D input (Batch, Time, Channel, Height, Width) in order to be compatible with layers that can only take a 4D input, such as convolutional and pooling layers.

forward(input_data: torch.Tensor) torch.Tensor[source]#

Forward pass with given data.


input_current – torch.Tensor Data to be processed. Expected shape: (batch, time, …)



Output data. Same shape as input_data.