MCPcopy Create free account

hub / github.com/JingyangQiao/prompt-gradient-projection / functions

Functions467 in github.com/JingyangQiao/prompt-gradient-projection

Method__getitem__
Args: index (int): Index Returns: tuple: (image, target) where target is index of the target class.
l2p-pgp/continual_datasets/continual_datasets.py:173
Method__getitem__
Args: index (int): Index Returns: tuple: (image, target) where target is index of the target class.
l2p-pgp/continual_datasets/continual_datasets.py:234
Method__getitem__
(self, idx)
l2p-pgp/continual_datasets/continual_datasets.py:304
Method__getitem__
Returns pil_image and class_id for given index
l2p-pgp/continual_datasets/continual_datasets.py:382
Method__getitem__
(self, item)
clip-pgp/datasets/data_manager.py:110
Method__getitem__
Args: index (int): Index Returns: tuple: (image, target) where target is index of the target class.
dualprompt-pgp/continual_datasets/continual_datasets.py:73
Method__getitem__
Args: index (int): Index Returns: tuple: (image, target) where target is index of the target class.
dualprompt-pgp/continual_datasets/continual_datasets.py:170
Method__getitem__
Args: index (int): Index Returns: tuple: (image, target) where target is index of the target class.
dualprompt-pgp/continual_datasets/continual_datasets.py:230
Method__getitem__
(self, idx)
dualprompt-pgp/continual_datasets/continual_datasets.py:299
Method__getitem__
Returns pil_image and class_id for given index
dualprompt-pgp/continual_datasets/continual_datasets.py:376
Method__init__
(self, window_size=20, fmt=None)
l2p-pgp/utils.py:29
Method__init__
(self, delimiter="\t")
l2p-pgp/utils.py:87
Method__init__
(self, length=5, embed_dim=768, embedding_key='mean', prompt_init='uniform', prompt_pool=False,
l2p-pgp/prompt.py:5
Method__init__
(self, lambd, nb_classes)
l2p-pgp/datasets.py:24
Method__init__
(self, dim, num_heads=8, qkv_bias=False, attn_drop=0., proj_drop=0.)
l2p-pgp/vision_transformer.py:196
Method__init__
(self, dim, init_values=1e-5, inplace=False)
l2p-pgp/vision_transformer.py:224
Method__init__
( self, dim, num_heads, mlp_ratio=4., qkv_bias=False, drop=0., attn_drop=0., init_values=None,
l2p-pgp/vision_transformer.py:258
Method__init__
( self, dim, num_heads, num_parallel=2, mlp_ratio=4., qkv_bias=False, init_values=None,
l2p-pgp/vision_transformer.py:288
Method__init__
Args: img_size (int, tuple): input image size patch_size (int, tuple): patch size in_chans (int): number
l2p-pgp/vision_transformer.py:332
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
l2p-pgp/continual_datasets/continual_datasets.py:34
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
l2p-pgp/continual_datasets/continual_datasets.py:129
Method__init__
(self, root, split='train', transform=None, target_transform=None, download=False)
l2p-pgp/continual_datasets/continual_datasets.py:274
Method__init__
(self, root, split='train', transform=None, target_transform=None, download=False)
l2p-pgp/continual_datasets/continual_datasets.py:343
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
l2p-pgp/continual_datasets/continual_datasets.py:428
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
l2p-pgp/continual_datasets/continual_datasets.py:501
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
l2p-pgp/continual_datasets/continual_datasets.py:571
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
l2p-pgp/continual_datasets/continual_datasets.py:638
Method__init__
(self, args)
clip-pgp/methods/base.py:9
Method__init__
(self, args)
clip-pgp/methods/tprompt.py:18
Method__init__
(self, dataset_name, shuffle, seed, init_class, increment, args=None)
clip-pgp/datasets/data_manager.py:13
Method__init__
(self, images, labels, transforms=None)
clip-pgp/datasets/data_manager.py:100
Method__init__
(self)
clip-pgp/datasets/data.py:28
Method__init__
(self, args)
clip-pgp/models/tclip.py:11
Method__init__
(self, cfg, classnames, clip_model)
clip-pgp/models/clip/prompt_learner.py:45
Method__init__
(self, bpe_path: str = default_bpe())
clip-pgp/models/clip/simple_tokenizer.py:63
Method__init__
(self, inplanes, planes, stride=1)
clip-pgp/models/clip/model.py:13
Method__init__
(self, spacial_dim: int, embed_dim: int, num_heads: int, output_dim: int = None)
clip-pgp/models/clip/model.py:57
Method__init__
(self, layers, output_dim, heads, input_resolution=224, width=64)
clip-pgp/models/clip/model.py:101
Method__init__
(self, d_model: int, n_head: int, attn_mask: torch.Tensor = None)
clip-pgp/models/clip/model.py:168
Method__init__
(self, width: int, layers: int, heads: int, attn_mask: torch.Tensor = None)
clip-pgp/models/clip/model.py:192
Method__init__
(self, input_resolution: int, patch_size: int, width: int, layers: int, heads: int, output_dim: int)
clip-pgp/models/clip/model.py:203
Method__init__
(self, window_size=20, fmt=None)
dualprompt-pgp/utils.py:29
Method__init__
(self, delimiter="\t")
dualprompt-pgp/utils.py:87
Method__init__
(self, length=5, embed_dim=768, embedding_key='mean', prompt_init='uniform', prompt_pool=False,
dualprompt-pgp/prompt.py:5
Method__init__
(self, lambd, nb_classes)
dualprompt-pgp/datasets.py:23
Method__init__
(self, dim, num_heads=8, qkv_bias=False, attn_drop=0., proj_drop=0.)
dualprompt-pgp/attention.py:14
Method__init__
(self, dim, num_heads=8, qkv_bias=False, attn_drop=0., proj_drop=0.)
dualprompt-pgp/vision_transformer.py:197
Method__init__
(self, dim, init_values=1e-5, inplace=False)
dualprompt-pgp/vision_transformer.py:225
Method__init__
( self, dim, num_heads, mlp_ratio=4., qkv_bias=False, drop=0., attn_drop=0., init_values=None,
dualprompt-pgp/vision_transformer.py:259
Method__init__
( self, dim, num_heads, num_parallel=2, mlp_ratio=4., qkv_bias=False, init_values=None,
dualprompt-pgp/vision_transformer.py:289
Method__init__
Args: img_size (int, tuple): input image size patch_size (int, tuple): patch size in_chans (int): number
dualprompt-pgp/vision_transformer.py:333
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
dualprompt-pgp/continual_datasets/continual_datasets.py:33
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
dualprompt-pgp/continual_datasets/continual_datasets.py:126
Method__init__
(self, root, split='train', transform=None, target_transform=None, download=False)
dualprompt-pgp/continual_datasets/continual_datasets.py:269
Method__init__
(self, root, split='train', transform=None, target_transform=None, download=False)
dualprompt-pgp/continual_datasets/continual_datasets.py:337
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
dualprompt-pgp/continual_datasets/continual_datasets.py:421
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
dualprompt-pgp/continual_datasets/continual_datasets.py:493
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
dualprompt-pgp/continual_datasets/continual_datasets.py:562
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False)
dualprompt-pgp/continual_datasets/continual_datasets.py:628
Method__len__
(self)
l2p-pgp/continual_datasets/continual_datasets.py:256
Method__len__
(self)
l2p-pgp/continual_datasets/continual_datasets.py:301
Method__len__
(self)
l2p-pgp/continual_datasets/continual_datasets.py:379
Method__len__
(self)
clip-pgp/datasets/data_manager.py:107
Method__len__
(self)
dualprompt-pgp/continual_datasets/continual_datasets.py:252
Method__len__
(self)
dualprompt-pgp/continual_datasets/continual_datasets.py:296
Method__len__
(self)
dualprompt-pgp/continual_datasets/continual_datasets.py:373
Method__str__
(self)
l2p-pgp/utils.py:77
Method__str__
(self)
l2p-pgp/utils.py:106
Method__str__
(self)
dualprompt-pgp/utils.py:77
Method__str__
(self)
dualprompt-pgp/utils.py:106
Method_compute_accuracy
(self, model, loader)
clip-pgp/methods/base.py:49
Function_convert_weights_to_fp16
(l)
clip-pgp/models/clip/model.py:385
Method_eval_cnn
(self, loader)
clip-pgp/methods/tprompt.py:158
Method_init_weights
(self, m)
l2p-pgp/vision_transformer.py:425
Method_init_weights
(self, m)
dualprompt-pgp/vision_transformer.py:484
Function_load_checkpoint_for_ema
Workaround for ModelEma._load_checkpoint to accept an already-loaded object
l2p-pgp/utils.py:168
Function_load_checkpoint_for_ema
Workaround for ModelEma._load_checkpoint to accept an already-loaded object
dualprompt-pgp/utils.py:168
Method_train
(self)
clip-pgp/methods/base.py:46
Methodafter_task
(self)
clip-pgp/methods/tprompt.py:39
Methodavg
(self)
l2p-pgp/utils.py:61
Methodavg
(self)
dualprompt-pgp/utils.py:61
Functionbar_update
(count, block_size, total_size)
l2p-pgp/continual_datasets/dataset_utils.py:26
Functionbar_update
(count, block_size, total_size)
dualprompt-pgp/continual_datasets/dataset_utils.py:26
Functioncheckpoint_filter_fn
convert patch embedding weight from manual patchify + linear proj to conv
l2p-pgp/vision_transformer.py:686
Functioncheckpoint_filter_fn
convert patch embedding weight from manual patchify + linear proj to conv
dualprompt-pgp/vision_transformer.py:782
Methodcopy
(self)
clip-pgp/models/tclip.py:92
Functiondownload_file_from_google_drive
Download a Google Drive file from and place it in root. Args: file_id (str): id of file to be downloaded root (str): Directory to
l2p-pgp/continual_datasets/dataset_utils.py:152
Functiondownload_file_from_google_drive
Download a Google Drive file from and place it in root. Args: file_id (str): id of file to be downloaded root (str): Directory to
dualprompt-pgp/continual_datasets/dataset_utils.py:152
Methodextra_repr
(self)
l2p-pgp/continual_datasets/continual_datasets.py:269
Methodextra_repr
(self)
l2p-pgp/continual_datasets/continual_datasets.py:316
Methodextra_repr
(self)
dualprompt-pgp/continual_datasets/continual_datasets.py:265
Methodextra_repr
(self)
dualprompt-pgp/continual_datasets/continual_datasets.py:311
Methodfeature_dim
(self)
clip-pgp/methods/base.py:20
Methodfeature_dim
(self)
clip-pgp/models/tclip.py:38
Methodforward
(self, x_embed, prompt_mask=None, cls_features=None)
l2p-pgp/prompt.py:47
Methodforward
(self, x)
l2p-pgp/vision_transformer.py:208
Methodforward
(self, x)
l2p-pgp/vision_transformer.py:229
Methodforward
(self, x)
l2p-pgp/vision_transformer.py:250
Methodforward
(self, x)
l2p-pgp/vision_transformer.py:280
Methodforward
(self, x)
l2p-pgp/vision_transformer.py:320
← previousnext →201–300 of 467, ranked by callers