InputConfig

class torch_ecg.components.InputConfig(*args: CFG | dict, input_type: str, n_channels: int, n_samples: int = -1, ensure_batch_dim: bool = True, **kwargs: dict)[source]

Bases: CFG

A Class to store the configuration of the input.

Parameters:
  • input_type ({"waveform", "fft", "spectrogram"}, optional) – Type of the input.

  • n_channels (int) – Number of channels of the input.

  • n_samples (int) – Number of samples of the input.

  • ensure_batch_dim (bool) – Whether to ensure the transformed input has a batch dimension.

Examples

input_config = InputConfig(
    input_type="waveform",
    n_channels=12,
    n_samples=5000,
)