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

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

Same as parent IAF 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.