Skip to content
data

ResNeXtConfig

extendsModelConfig
ResNeXtConfig(num_classes: int = 1000, in_channels: int = 3, layers: tuple[int, ...] = (3, 4, 6, 3), cardinality: int = 32, width_per_group: int = 4, dropout: float = 0.0, zero_init_residual: bool = False)

Unified config for all ResNeXt variants (Xie et al., 2017).

ResNeXt extends ResNet by replacing the plain 3×3 conv in each bottleneck with a grouped convolution of cardinality groups, where each group handles width_per_group channels.

layers is the per-stage repetition count, e.g. (3, 4, 6, 3) for ResNeXt-50. cardinality and width_per_group jointly determine the intermediate width inside each bottleneck.

Examples

>>> from lucid.models.vision.resnext._config import ResNeXtConfig
>>> cfg = ResNeXtConfig()
>>> cfg.model_type
'resnext'
>>> cfg.num_classes, cfg.in_channels
(1000, 3)

Used by 3