Skip to content
fn

resnext_101_32x4d

→ResNeXt
resnext_101_32x4d(pretrained: bool = False, overrides: object = {})

ResNeXt-101 (32x4d) feature-extracting backbone.

Builds a ResNeXt with the paper-cited ResNeXt-101 (32x4d) topology: per-stage block counts (3, 4, 23, 3) (same as ResNet-101), cardinality C=32C = 32, width per group d=4d = 4. 42.1 M parameters without a classifier head (resnext_101_32x4d_cls adds 2.05 M more, reaching the 44.2 M the paper quotes); reaches 78.8% ImageNet top-1 in Xie et al., 2017.

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for resnext_101_32x4d, so True raises NotImplementedError rather than return randomly initialised weights. resnext_101_32x4d_cls is the checkpointed variant.
**overridesobject= {}
Keyword overrides forwarded into ResNeXtConfig.

Returns

ResNeXt

Backbone with the ResNeXt-101 (32x4d) configuration applied (or with overrides merged on top of it).

Notes

See Xie et al., CVPR 2017, Table 1. Same depth as ResNet-101 with the 3×33\times3 middle convolution split into 32 groups.

Examples

>>> import lucid
>>> from lucid.models.vision.resnext import resnext_101_32x4d
>>> model = resnext_101_32x4d()
>>> x = lucid.randn(1, 3, 224, 224)
>>> out = model(x)
>>> out.last_hidden_state.shape   # (B, 2048, 7, 7)
(1, 2048, 7, 7)

Used by 1