torch_ecg.models.BACKBONES#

torch_ecg.models.BACKBONES = Registry(name=backbones, items=['DenseNet', 'dense_net', 'densenet', 'MobileNetV1', 'mobile_net_v1', 'mobilenet_v1', 'MobileNetV2', 'mobile_net_v2', 'mobilenet_v2', 'MobileNetV3', 'mobile_net_v3', 'mobilenet_v3', 'MultiScopicCNN', 'multi_scopic_cnn', 'multi_scopic', 'ResNet', 'resnext', 'resnet', 'RegNet', 'regnet', 'VGG16', 'vgg16', 'Xception', 'xception'])#

Registry for managing and building modules.

A registry is used to map strings (module names) to classes, and provides a unified interface to instantiate modules from configurations.

Parameters:

name (str) – Name of the registry.

Examples

>>> BACKBONES = Registry("backbones")
>>> @BACKBONES.register()
... class ResNet(nn.Module):
...     def __init__(self, depth):
...         self.depth = depth
>>> # Build from string
>>> model = BACKBONES.build("ResNet", depth=50)
>>> # Build from config dict
>>> model = BACKBONES.build({"name": "ResNet", "depth": 101})