resnet_101_cls(pretrained: bool | str = False, weights: ResNet101Weights | None = None, overrides: object = {})ResNet-101 image classifier (backbone + GAP + linear head).
Builds a ResNetForImageClassification with the paper-cited
ResNet-101 topology: _Bottleneck blocks stacked
[3, 4, 23, 3] over four stages, followed by global average
pooling and a linear projection to config.num_classes.
Approximately 44.5M parameters and 77.37% ImageNet-1k top-1 in
He et al., 2015 (Table 4).
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag (ResNet101Weights.IMAGENET1K_V1);
a tag string → that specific checkpoint. Mutually exclusive
with weights (which wins if both are given).Explicit weights enum member. Takes precedence over
pretrained.**overridesobject= {}Keyword overrides forwarded into
ResNetConfig.Returns
ResNetForImageClassificationClassifier with the ResNet-101 configuration applied (or with
overrides merged on top of it), optionally initialised from
pretrained weights.
Notes
See He et al., "Deep Residual Learning for Image Recognition",
CVPR 2016 (arXiv:1512.03385), Table 1. Pretrained weights are
converted from torchvision's ResNet101_Weights and hosted on the
Hugging Face Hub under lucid-dl/resnet-101.
Examples
>>> import lucid
>>> from lucid.models.vision.resnet import resnet_101_cls
>>> model = resnet_101_cls()
>>> x = lucid.randn(1, 3, 224, 224)
>>> out = model(x)
>>> out.logits.shape
(1, 1000)