torch_ecg.models.MODELS#
- torch_ecg.models.MODELS = Registry(name=models, items=['ECG_CRNN', 'ECG_CRNN_v1', 'ECG_SEQ_LAB_NET', 'RR_LSTM', 'ECG_SUBTRACT_UNET', 'ECG_UNET'])#
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})