ECG_SEQ_LAB_NET¶
- class torch_ecg.models.ECG_SEQ_LAB_NET(classes: Sequence[str], n_leads: int, config: CFG | None = None)[source]¶
Bases:
ECG_CRNN
SOTA model from CPSC2019 challenge.
Sequence labeling nets, for wave delineation, QRS complex detection, etc. Proposed in [Cai and Hu[1]].
pipeline
(multi-scopic, etc.) cnn –> head ((bidi-lstm –>) “attention” –> seq linear) -> output
- Parameters:
References
- compute_output_shape(seq_len: int | None = None, batch_size: int | None = None) Sequence[int | None] [source]¶
Compute the output shape of the model.
- forward(input: Tensor) Tensor [source]¶
Forward pass.
- Parameters:
input (torch.Tensor) – Input tensor, of shape
(batch_size, channels, seq_len)
.- Returns:
pred – Output tensor, of shape
(batch_size, seq_len, n_classes)
- Return type: