Skip to content
fn

crossvit_9

→CrossViT8.2M
crossvit_9(pretrained: bool = False, overrides: object = {})

CrossViT-9 backbone — embed_dims=(128, 256), depths ((1, 3, 0))×3, 4 heads. ~8.6M params (paper Table 2).

Model Size

Parameters

pretrainedbool= False
No checkpoint is published for crossvit_9, so True raises NotImplementedError rather than return randomly initialised weights. crossvit_9_cls is the checkpointed variant.
**overridesobject= {}
Fields of CrossViTConfig to change from the CrossViT-9 defaults (e.g. in_channels=1).

Examples

>>> import lucid
>>> from lucid.models.vision.crossvit import crossvit_9
>>> model = crossvit_9()
>>> out = model(lucid.randn(1, 3, 240, 240))
>>> out.last_hidden_state.shape
(1, 384)
CrossViT works at 240 pixels rather than 224: the two branches
use 12- and 16-pixel patches, and 240 is what both divide.

Used by 1