Skip to content
data

InceptionNeXtConfig

extendsModelConfig
InceptionNeXtConfig(num_classes: int = 1000, in_channels: int = 3, depths: tuple[int, ...] = (3, 3, 9, 3), dims: tuple[int, ...] = (96, 192, 384, 768), band_kernel: int = 11, square_kernel: int = 3, branch_ratio: float = 0.125, mlp_ratios: int | tuple[int, ...] = (4, 4, 4, 3), drop_path_rate: float = 0.0, drop_rate: float = 0.0)

Configuration dataclass for every InceptionNeXt variant.

InceptionNeXtConfig is an immutable container that fully specifies the architecture of an InceptionNeXt (Yu et al., 2024). InceptionNeXt is a drop-in replacement for the ConvNeXt block that factorizes the single large 7×77 \times 7 depthwise convolution into four parallel Inception-style branches:

IDWConv(x)=Concat(x(1),  DW3×3(x(2)),  DW1×K(x(3)),  DWK×1(x(4))).\mathrm{IDWConv}(x) = \mathrm{Concat}\bigl( x^{(1)},\; \mathrm{DW}_{3 \times 3}(x^{(2)}),\; \mathrm{DW}_{1 \times K}(x^{(3)}),\; \mathrm{DW}_{K \times 1}(x^{(4)})\bigr).

The remaining elements of the ConvNeXt block (BatchNorm, inverted- bottleneck Conv-MLP, layer scale, residual) are kept unchanged, so the Tiny / Small / Base variants reuse the same depth and width tables as ConvNeXt while running noticeably faster.

Parameters

num_classesint= 1000
Number of output classes for the classification head. Defaults to 1000 (ImageNet-1k).
in_channelsint= 3
Number of input image channels. Defaults to 3 (RGB).
depthstuple of int= (3, 3, 9, 3)
Number of MetaNeXt blocks in each of the four stages. Defaults to (3, 3, 9, 3) (InceptionNeXt-T).
dimstuple of int= (96, 192, 384, 768)
Channel width per stage. Defaults to (96, 192, 384, 768) (InceptionNeXt-T).
band_kernelint= 11
Kernel length KK of the horizontal 1×K1 \times K and vertical K×1K \times 1 band depthwise convolutions inside the Inception token mixer. Defaults to 11.
mlp_ratiosint or tuple of int= (4, 4, 4, 3)
Per-stage MLP expansion ratios; a scalar is broadcast across all stages, as the reference does. Defaults to (4, 4, 4, 3) — the reference recipe uses ratio 3 in the final stage to match the head's compute budget. A tuple whose length differs from len(depths) is rejected here rather than failing later inside the builder.

Attributes

model_typeClassVar[str]
Constant string "inception_next" used by the model registry.

Notes

Reference: Weihao Yu et al., "InceptionNeXt: When Inception Meets ConvNeXt", CVPR 2024, arXiv:2303.16900.

Examples

Build an InceptionNeXt-T configuration with a 100-class head:
>>> from lucid.models.vision.inception_next import InceptionNeXtConfig
>>> cfg = InceptionNeXtConfig(num_classes=100)
>>> cfg.depths, cfg.dims, cfg.band_kernel, cfg.num_classes
((3, 3, 9, 3), (96, 192, 384, 768), 11, 100)

Used by 3