torch_ecg.utils.compute_sequential_output_shape

torch_ecg.utils.compute_sequential_output_shape(model: torch.nn.modules.container.Sequential, seq_len: Optional[int] = None, batch_size: Optional[int] = None) Sequence[Optional[int]][source]

Compute the output shape of a sequential model.

Parameters
  • seq_len (int, optional) – Length of the input tensors.

  • batch_size (int, optional) – Batch size of the input tensors.

Returns

output_shape – The output shape of the module.

Return type

sequence