torch_ecg.utils.default_collate_fn#
- torch_ecg.utils.default_collate_fn(batch: Sequence[Tuple[ndarray, ...] | Dict[str, ndarray]]) Tuple[Tensor, ...] | Dict[str, Tensor] [source]#
Default collate functions for model training.
The data generator (
Dataset
) should generate (__getitem__) n-tuplessignals, labels, ...
, or dictionaries of tensors.