VGG16#
- class torch_ecg.models.VGG16(in_channels: int, **config)[source]#
Bases:
Sequential,SizeMixin,CitationMixinCNN 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_features_output_shape(seq_len: int | None = None, batch_size: int | None = None) Sequence[int | None][source]#
Compute the output shape of the features.
- compute_output_shape(seq_len: int | None = None, batch_size: int | None = None) Sequence[int | None][source]#
Compute the output shape of the module.
- forward_features(input: Tensor) Tensor[source]#
Forward pass of the model to extract features.
- Parameters:
input (torch.Tensor) – Input signal tensor, of shape
(batch_size, channels, seq_len).- Returns:
features – Feature map tensor, of shape
(batch_size, channels, seq_len).- Return type: