PVT v2-B5 backbone (Wang et al., 2022).
Builds the largest PVT v2 variant B5:
embed_dims=(64, 128, 320, 512), depths=(3, 6, 40, 3),
and mlp_ratios=(4.0, 4.0, 4.0, 4.0) (uniform MLP ratio).
81.4M parameters without a classifier head
(pvt_v2_b5_cls adds 0.51M more for the 1000-way head,
reaching 82.0M) — the largest variant in the paper.
Model Size
Parameters
pretrainedbool= FalseNo checkpoint is published for
pvt_v2_b5, so True raises
NotImplementedError rather than return randomly initialised weights.
pvt_v2_b5_cls is the checkpointed variant.**overridesobject= {}Keyword overrides on top of the canonical PVT v2-B5 config.
Returns
PVTA PVT backbone returning a flat
feature.
Notes
PVT v2-B5 reaches 83.8% top-1 on ImageNet-1k at 224x224 (Wang et al., 2022, Table 1) — the headline result of the paper.
Examples
>>> import lucid
>>> from lucid.models.vision.pvt import pvt_v2_b5
>>> model = pvt_v2_b5()
>>> x = lucid.randn(1, 3, 224, 224)
>>> model.forward_features(x).shape
(1, 512)