resnet_152_cls(pretrained: bool | str = False, weights: ResNet152Weights | None = None, overrides: object = {})ResNet-152 image classifier (backbone + GAP + linear head).
Builds a ResNetForImageClassification with the paper-cited
ResNet-152 topology: _Bottleneck blocks stacked
[3, 8, 36, 3] over four stages, followed by global average
pooling and a linear projection to config.num_classes.
Approximately 60.2M parameters and 78.31% ImageNet-1k top-1 in
He et al., 2015 (Table 4) — the deepest and most accurate of the
original ResNet variants.
Model Size
Parameters
pretrainedbool or str= FalseFalse → random init; True
→ the DEFAULT tag (ResNet152Weights.IMAGENET1K_V1);
a tag string → that specific checkpoint. Mutually exclusive
with weights (which wins if both are given).pretrained.**overridesobject= {}ResNetConfig.Returns
ResNetForImageClassificationClassifier with the ResNet-152 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 ResNet152_Weights and hosted on the
Hugging Face Hub under lucid-dl/resnet-152.
Examples
>>> import lucid
>>> from lucid.models.vision.resnet import resnet_152_cls
>>> model = resnet_152_cls()
>>> x = lucid.randn(1, 3, 224, 224)
>>> out = model(x)
>>> out.logits.shape
(1, 1000)