class
InceptionNeXt
extends
PretrainedModelBackboneMixinInceptionNeXt(config: InceptionNeXtConfig)InceptionNeXt backbone (Yu et al., 2024).
A drop-in replacement for the ConvNeXt backbone that factorizes the single large depthwise conv into four parallel Inception-style branches operating on disjoint channel splits:
with (default 11). The four branches together preserve a large effective receptive field while cutting depthwise FLOPs and memory traffic relative to a single depthwise conv. Each MetaNeXtBlock further applies BatchNorm, a 1x1 Conv-MLP, and a layer-scale parameter on the residual branch.
forward_features returns the global-average-pooled
feature.
Parameters
configInceptionNeXtConfigFrozen dataclass specifying
depths, dims,
band_kernel, mlp_ratios, in_channels, and
num_classes. See InceptionNeXtConfig.Attributes
stemnn.SequentialPatchify stem: stride-4 Conv2d + BatchNorm2d.
stagesnn.ModuleListFour
_Stage modules, each containing an optional
downsampler and a sequence of MetaNeXt blocks.feature_infolist[FeatureInfo]Four-stage feature description with reductions
.
Notes
Reference: Weihao Yu et al., "InceptionNeXt: When Inception Meets ConvNeXt", CVPR 2024, arXiv:2303.16900.
Examples
Build an InceptionNeXt-T backbone and run a forward pass:
>>> import lucid
>>> from lucid.models.vision.inception_next import (
... InceptionNeXt, InceptionNeXtConfig,
... )
>>> model = InceptionNeXt(InceptionNeXtConfig())
>>> x = lucid.randn(1, 3, 224, 224)
>>> feat = model.forward_features(x)
>>> feat.shape # (B, dims[-1])
(1, 768)