crossvit_tiny_cls(pretrained: bool | str = False, weights: CrossViTTinyWeights | None = None, overrides: object = {})CrossViT-Ti image classifier (Chen et al., ICCV 2021).
Two-branch ViT with embedding dims (96, 192), per-stage depths
((1, 4, 0)) x 3, and 3 attention heads per branch. ~7M
parameters; paper Table 2 reports 72.6% ImageNet-1k top-1 at
240x240.
Model Size
Parameters
pretrainedbool or str= FalseFalse returns randomly-initialised weights; True loads
the default entry of CrossViTTinyWeights; a string
selects a named entry from that enum.Explicit weight-enum member. Mutually exclusive with a string
pretrained; raises if both resolve to different entries.**overridesobject= {}Per-field overrides forwarded to
CrossViTConfig (e.g.
num_classes=10 to retarget the head).Returns
CrossViTForImageClassificationThe configured classifier, ready for model(x) inference or
fine-tuning.
Notes
Reference: Chen, Fan, and Panda, "CrossViT: Cross-Attention Multi-Scale Vision Transformer for Image Classification", ICCV 2021 (arXiv:2103.14899).