SizeMixin#
- class torch_ecg.utils.SizeMixin[source]#
Bases:
objectMixin class for size related methods
- compute_features_output_shape(*args: Any, **kwargs: Any) Sequence[int | None][source]#
Compute the output shape of the features.
By default, this is the same as the output shape of the model. For backbones with pooling and classification heads, this should be overridden to return the shape of the features before global pooling.
- Parameters:
*args (Any) – Positional arguments passed to compute_output_shape.
**kwargs (Any) – Keyword arguments passed to compute_output_shape.
- Returns:
output_shape – Output shape of the features.
- Return type:
sequence
- property module_size: int#
Size of trainable parameters in the model in terms of number of parameters.