RegNet¶
- class torch_ecg.models.RegNet(in_channels: int, **config)[source]¶
Bases:
torch.nn.modules.container.Sequential
,torch_ecg.utils.utils_nn.SizeMixin
,torch_ecg.utils.misc.CitationMixin
RegNet model.
RegNet is a family of convolutional neural networks that can be constructed by efficiently scaling and pruning a single convolutional “stem” network. This architecture is proposed in 1, and the implementation is adapted from 2.
References
- Parameters
in_channels (int) – Number of channels of the input.
config (dict) –
Hyper-parameters of the Module, ref. corr. config file. Keyword arguments that must be set:
filter_lengths: int or sequence of int, filter length(s) (kernel size(s)) of the convolutions, with granularity to the whole network, to each stage.
subsample_lengths: int or sequence of int, subsampling length(s) (ratio(s)) of all blocks, with granularity to the whole network, to each stage.
tot_blocks: int, the total number of building blocks.
w_a, w_0, w_m: float, the parameters for the widths generating function.
group_widths: int or sequence of int, the number of channels in each group, with granularity to the whole network, to each stage.
num_blocks: sequence of int, optional, the number of blocks in each stage, if not given, will be computed from tot_blocks and w_a, w_0, w_m.
num_filters: int or sequence of int, optional, the number of filters in each stage. If not given, will be computed from tot_blocks and w_a, w_0, w_m.
stem: dict, the config of the input stem.
block: dict, other parameters that can be set for the building blocks.