pvt_v2_b3_cls(pretrained: bool | str = False, weights: PVTv2B3Weights | None = None, overrides: object = {})PVT v2-B3 image classifier (Wang et al., 2022).
Combines the pvt_v2_b3 backbone with a mean pool + linear
classification head. ~45.2M parameters.
Model Size
Parameters
pretrainedbool or str= FalsePretrained-weight selector.
False → random init; True
→ the DEFAULT tag (PVTv2B3Weights.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 on top of the canonical PVT v2-B3 config.
Returns
PVTForImageClassificationClassifier whose logits has shape (B, num_classes).
Notes
PVT v2-B3 reaches 83.1% top-1 on ImageNet-1k at 224x224 (Wang
et al., 2022, Table 1). Pretrained weights are converted from
timm's pvt_v2_b3.in1k and hosted under lucid-dl/pvt-v2-b3.
Examples
>>> import lucid
>>> from lucid.models.vision.pvt import pvt_v2_b3_cls
>>> model = pvt_v2_b3_cls(num_classes=1000)
>>> x = lucid.randn(1, 3, 224, 224)
>>> model(x).logits.shape
(1, 1000)