MCPcopy Create free account

hub / github.com/FarinaMatteo/rethinking_fewshot_vlms / functions

Functions188 in github.com/FarinaMatteo/rethinking_fewshot_vlms

Method__init__
(self, data_source, input_size, transform=None,
datasets/utils.py:324
Method__init__
(self, root, num_shots, setting="standard", seed=1)
datasets/oxford_pets.py:23
Method__init__
(self, root, num_shots, setting="standard", seed=1)
datasets/oxford_flowers.py:18
Method__init__
(self, root, num_shots, setting="standard", seed=1)
datasets/sun397.py:15
Method__init__
(self, root, num_shots, setting="standard", seed=1)
datasets/food101.py:15
Method__init__
(self, root, num_shots, setting="standard", seed=1)
datasets/ucf101.py:16
Method__init__
(self, root, num_shots, setting="standard", seed=1)
datasets/dtd.py:16
Method__init__
(self, root, num_shots, setting="standard", seed=1)
datasets/eurosat.py:29
Method__init__
(self, root, num_shots, setting="standard", seed=1)
datasets/stanford_cars.py:15
Method__init__
(self, root, num_shots, setting="standard", seed=1)
datasets/caltech101.py:15
Method__init__
(self, clip_model, classnames, template="a photo of a {}.")
fs/twostage.py:40
Method__init__
( self, r: int, lora_alpha: int, fan_in_fan_out: bool = False, drop
loralib/layers.py:30
Method__init__
( self, num_embeddings: int, embedding_dim: int, r: int = 0, lora_alph
loralib/layers.py:115
Method__init__
( self, existing_linear: nn.Linear, r: int = 0, lora_alpha: int = 1,
loralib/layers.py:154
Method__init__
( self, in_channels: int, out_channels: int, kernel_size: int, r: in
loralib/layers.py:255
Method__init__
( self, in_channels: int, out_channels: int, kernel_size: int, r: in
loralib/layers.py:298
Method__init__
( self, existing_mha: nn.MultiheadAttention, enable_lora: list = ['q', 'k'
loralib/layers.py:341
Method__init__
( self, in_features: int, out_features: int, r: int = 0, lora_alph
loralib/layers.py:536
Method__init__
( self, existing_mha: nn.MultiheadAttention)
loralib/easymultiheadattention.py:10
Method__len__
(self)
datasets/utils.py:359
Method_collate
(ims, y, c)
datasets/oxford_flowers.py:71
Method_collate
(ims, y, c)
datasets/dtd.py:78
Method_convert
(items)
datasets/oxford_pets.py:165
Function_convert_image_to_rgb
(image)
clip/clip.py:72
Function_convert_weights_to_fp16
(l)
clip/model.py:383
Method_extract
(items)
datasets/oxford_pets.py:138
Methodcheck_input_domains
(self, source_domains, target_domains)
datasets/utils.py:216
Methodclassname
(self)
datasets/utils.py:118
Methodclassnames
(self)
datasets/utils.py:171
Methoddomain
(self)
datasets/utils.py:114
Methoddownload_data
(self, url, dst, from_gdrive=True)
datasets/utils.py:228
Methoddtype
(self)
clip/model.py:342
Methodforward
(self, x: torch.Tensor)
clip/model.py:40
Methodforward
(self, x)
clip/model.py:66
Methodforward
(self, x)
clip/model.py:135
Methodforward
(self, x: torch.Tensor)
clip/model.py:156
Methodforward
(self, x: torch.Tensor)
clip/model.py:163
Methodforward
(self, x: torch.Tensor)
clip/model.py:186
Methodforward
(self, x: torch.Tensor)
clip/model.py:207
Methodforward
(self, x: torch.Tensor)
clip/model.py:228
Methodforward
(self, x, no_grad_backbone=False)
fs/twostage.py:68
Methodforward
(self, x: torch.Tensor, **kwargs)
loralib/layers.py:142
Methodforward
(self, x: torch.Tensor, **kwargs)
loralib/layers.py:186
Methodforward
(self, x: torch.Tensor, **kwargs)
loralib/layers.py:286
Methodforward
(self, x: torch.Tensor, **kwargs)
loralib/layers.py:329
Methodforward
(self, query: torch.Tensor, key: torch.Tensor, value: torch.Tensor,
loralib/layers.py:523
Methodforward
(self, x: torch.Tensor, **kwargs)
loralib/layers.py:590
Methodforward
( self, query, key, value, key_padding_mask=None,
loralib/easymultiheadattention.py:37
Methodget_last_hidden_states
(self, to_tensor=True)
clip/model.py:201
Methodimpath
(self)
datasets/utils.py:106
Methodlab2cname
(self)
datasets/utils.py:167
Methodlabel
(self)
datasets/utils.py:110
Functionload
Load a CLIP model Parameters ---------- name : str A model name listed by `clip.available_models()`, or the path to a model check
clip/clip.py:91
Functionload_lora
(args, list_lora_layers)
loralib/utils.py:187
Methodload_preprocessed
(preprocessed)
datasets/oxford_pets.py:72
Functionlora_state_dict
(model: nn.Module, bias: str = 'none')
loralib/utils.py:67
Methodmerge_BA
(self, param_name: str)
loralib/layers.py:577
Methodnum_classes
(self)
datasets/utils.py:187
Methodread_and_split_data
( image_dir, p_trn=0.5, p_val=0.2, ignored=[], new_cnames=None )
datasets/dtd.py:57
Methodread_data
(self, split_file)
datasets/oxford_pets.py:89
Methodread_data
(self)
datasets/oxford_flowers.py:60
Methodread_data
(self, cname2lab, text_file)
datasets/sun397.py:54
Methodread_data
(self, cname2lab, text_file)
datasets/ucf101.py:56
Methodread_data
(self, image_dir, anno_file, meta_file)
datasets/stanford_cars.py:54
Functionrun_ln_only
(args, clip_model, logit_scale, dataset, train_loader, val_loader, test_loader)
fs/ln_only.py:68
Functionrun_lora
(args, clip_model, logit_scale, dataset, train_loader, val_loader, test_loader)
fs/lora.py:13
Functionrun_twostage
(args, clip_model, logit_scale, dataset, train_loader, val_loader, test_loader)
fs/twostage.py:251
Methodsave_split
(train, val, test, filepath, path_prefix)
datasets/oxford_pets.py:137
Methodsplit_dataset_by_domain
Split a dataset, i.e. a list of Datum objects, into domain-specific groups stored in a dictionary. Args: data_source (lis
datasets/utils.py:308
Methodsplit_trainval
(trainval, p_val=0.2)
datasets/oxford_pets.py:114
Methodstem
(x)
clip/model.py:136
Methodtest
(self)
datasets/utils.py:159
Methodtest_classnames
(self)
datasets/utils.py:179
Methodtest_new
(self)
datasets/utils.py:163
Methodtest_new_classnames
(self)
datasets/utils.py:183
Functiontokenize
Returns the tokenized representation of given input string(s) Parameters ---------- texts : Union[str, List[str]] An input s
clip/clip.py:193
Methodtrain
(self, mode: bool = True)
loralib/layers.py:138
Methodtrain
(self, mode: bool = True)
loralib/layers.py:181
Methodtrain
(self, mode: bool = True)
loralib/layers.py:282
Methodtrain
(self, mode: bool = True)
loralib/layers.py:325
Methodtrain
(self, mode: bool = True)
loralib/layers.py:519
Methodtrain
(self, mode: bool = True)
loralib/layers.py:586
Methodtrain_u
(self)
datasets/utils.py:151
Methodtrain_x
(self)
datasets/utils.py:147
Methodupdate_classname
(self, dataset_old)
datasets/eurosat.py:63
Methodval
(self)
datasets/utils.py:155
Methodval_classnames
(self)
datasets/utils.py:175
Functionzero_shot_eval
(clip_model, dataset, loader, split="test")
fs/utils/eval_utils.py:48
← previous101–188 of 188, ranked by callers