| 568 | |
| 569 | @dataclass |
| 570 | class CLIPVisionCfg: |
| 571 | layers: Union[Tuple[int, int, int, int], int] = 12 |
| 572 | width: int = 768 |
| 573 | teacher_width: int = -1 |
| 574 | head_width: int = 64 |
| 575 | mlp_ratio: float = 4.0 |
| 576 | patch_size: int = 16 |
| 577 | image_size: Union[Tuple[int, int], int] = 224 |
| 578 | timm_model_name: str = None # a valid model name overrides layers, width, patch_size |
| 579 | # use (imagenet) pretrained weights for named model |
| 580 | timm_model_pretrained: bool = False |
| 581 | # feature pooling for timm model ('abs_attn', 'rot_attn', 'avg', '') |
| 582 | timm_pool: str = 'avg' |
| 583 | # linear projection for timm model output ('linear', 'mlp', '') |
| 584 | timm_proj: str = 'linear' |
| 585 | |
| 586 | |
| 587 | @dataclass |
no outgoing calls
no test coverage detected