# UnflattenTime#

class sinabs.layers.UnflattenTime(batch_size: int)[source]#

Utility layer which always unflattens (expands) the first dimension into two separate ones. Meant to convert a tensor of dimensions (Batch*Time, Channels, Height, Width) into a tensor of (Batch, Time, Channels, Height, Width).

Shape:
• Input: $$(Batch \times Time, Channel, Height, Width)$$ or $$(Batch \times Time, Channel)$$

• Output: $$(Batch, Time, Channel, Height, Width)$$ or $$(Batch, Time, Channel)$$

Parameters:

batch_size (int) –

forward(x)[source]#

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.