sk_resnet_34_cls(pretrained: bool | str = False, weights: SKResNet34Weights | None = None, overrides: object = {})SK-ResNet-34 image classifier (backbone + GAP + linear head).
Builds an SKNetForImageClassification with the
SK-ResNet-34 backbone (basic blocks stacked [3, 4, 6, 3];
the first of each block is a Selective Kernel
unit, the second a plain conv) followed by global average pooling
and a linear projection. Approximately 22.28M parameters.
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag (SKResNet34Weights.RA_IN1K); 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
SKNetConfig.Returns
SKNetForImageClassificationClassifier with the SK-ResNet-34 configuration applied
(or with overrides merged on top of it), optionally
initialised from pretrained weights.
Notes
See Li et al., "Selective Kernel Networks", CVPR 2019
(arXiv:1903.06586). Pretrained weights are converted from
timm's skresnet34.ra_in1k and hosted on the Hugging Face
Hub under lucid-dl/sk-resnet-34.
Examples
>>> import lucid
>>> from lucid.models.vision.sknet import sk_resnet_34_cls
>>> model = sk_resnet_34_cls()
>>> x = lucid.randn(1, 3, 224, 224)
>>> out = model(x)
>>> out.logits.shape
(1, 1000)