PVT v2-B2-Li backbone — B2 with linear SRA (Wang et al., 2022).
Same topology as pvt_v2_b2, but §3.5's linear spatial-reduction
attention: every stage average-pools its key/value map to a fixed
grid before the projection,
instead of applying a stride- convolution. Attention cost
becomes linear in the token count rather than quadratic.
Model Size
Parameters
pretrainedbool= FalseNo checkpoint is published for
pvt_v2_b2_li, so True raises
NotImplementedError rather than return randomly initialised weights.**overridesobject= {}Keyword overrides on top of the canonical PVT v2-B2-Li config.
Returns
PVTA PVT backbone returning a flat feature.
Notes
Table 1 carries a full "B2-Li" column and Table 2 reports it at 22.6M parameters, 3.9 GFLOPs and 82.1% top-1 on ImageNet-1k.
Examples
>>> import lucid
>>> from lucid.models.vision.pvt import pvt_v2_b2_li
>>> model = pvt_v2_b2_li()
>>> model.forward_features(lucid.randn(1, 3, 224, 224)).shape
(1, 512)