VGG16

class torch_ecg.models.VGG16(in_channels: int, **config)[source]

Bases: Sequential, SizeMixin, CitationMixin

CNN feature extractor of VGG architecture.

Parameters:
  • in_channels (int) – Number of channels in the input.

  • config (dict) –

    Other hyper-parameters of the Module, including number of convolutional layers, number of filters for each layer, and more for VGGBlock. Key word arguments that have to be set:

    • num_convs: sequence of int, number of convolutional layers for each VGGBlock.

    • num_filters: sequence of int, number of filters for each VGGBlock.

    • groups: int, connection pattern (of channels) of the inputs and outputs.

    • block: dict, other parameters that can be set for VGGBlock.

    For a full list of configurable parameters, ref. corr. config file.

compute_output_shape(seq_len: int | None = None, batch_size: int | None = None) Sequence[int | None][source]

Compute the output shape of the module.

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