MCPcopy Create free account

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

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

Methodforward
(self, x, task_id=-1, cls_features=None, train=False)
l2p-pgp/vision_transformer.py:516
Methodforward
(self, image)
clip-pgp/models/tclip.py:41
Methodforward
(self, prompts, tokenized_prompts)
clip-pgp/models/clip/prompt_learner.py:34
Methodforward
(self)
clip-pgp/models/clip/prompt_learner.py:95
Methodforward
(self, x: torch.Tensor)
clip-pgp/models/clip/model.py:40
Methodforward
(self, x)
clip-pgp/models/clip/model.py:66
Methodforward
(self, x)
clip-pgp/models/clip/model.py:135
Methodforward
(self, x: torch.Tensor)
clip-pgp/models/clip/model.py:156
Methodforward
(self, x: torch.Tensor)
clip-pgp/models/clip/model.py:163
Methodforward
(self, x: torch.Tensor)
clip-pgp/models/clip/model.py:185
Methodforward
(self, x: torch.Tensor)
clip-pgp/models/clip/model.py:198
Methodforward
(self, x: torch.Tensor, instance_tokens=None)
clip-pgp/models/clip/model.py:221
Methodforward
(self, x_embed, prompt_mask=None, cls_features=None)
dualprompt-pgp/prompt.py:74
Methodforward
(self, x, prompt)
dualprompt-pgp/attention.py:26
Methodforward
(self, x, *args)
dualprompt-pgp/vision_transformer.py:209
Methodforward
(self, x)
dualprompt-pgp/vision_transformer.py:230
Methodforward
(self, x, prompt=None)
dualprompt-pgp/vision_transformer.py:251
Methodforward
(self, x)
dualprompt-pgp/vision_transformer.py:281
Methodforward
(self, x)
dualprompt-pgp/vision_transformer.py:321
Methodforward
(self, x, task_id=-1, cls_features=None, train=False)
dualprompt-pgp/vision_transformer.py:612
Methodfreeze
(self)
clip-pgp/models/tclip.py:95
Functionget_args_parser
(subparsers)
l2p-pgp/configs/cifar100_10_l2p_pgp.py:4
Functionget_args_parser
(subparsers)
l2p-pgp/configs/cifar100_20_l2p_pgp.py:4
Functionget_args_parser
(subparsers)
l2p-pgp/configs/tinyimagenet_l2p_pgp.py:4
Functionget_args_parser
(subparsers)
dualprompt-pgp/configs/cifar100_10_dualprompt_pgp.py:4
Functionget_args_parser
(subparsers)
dualprompt-pgp/configs/tinyimagenet_dualprompt_pgp.py:4
Functionget_args_parser
(subparsers)
dualprompt-pgp/configs/cifar100_20_dualprompt_pgp.py:4
Functionget_args_parser
(subparsers)
dualprompt-pgp/configs/imr_dualprompt_pgp.py:4
Methodget_classifier
(self)
l2p-pgp/vision_transformer.py:449
Methodget_classifier
(self)
dualprompt-pgp/vision_transformer.py:508
Functionget_model
(model_name, args)
clip-pgp/utils/factory.py:4
Functionget_prefix_matrix
(data_loader, model, device)
dualprompt-pgp/memory.py:6
Functionget_rep
(model, original_model, mem_example, task_id)
l2p-pgp/memory.py:18
Functionget_representation_matrix
(data_loader, device)
l2p-pgp/memory.py:5
Functionget_representation_matrix
(data_loader, device)
clip-pgp/utils/memory.py:5
Functionget_world_size
()
l2p-pgp/utils.py:201
Functionget_world_size
()
dualprompt-pgp/utils.py:201
Methodglobal_avg
(self)
l2p-pgp/utils.py:66
Methodglobal_avg
(self)
dualprompt-pgp/utils.py:66
Methodgroup_matcher
(self, coarse=False)
l2p-pgp/vision_transformer.py:438
Methodgroup_matcher
(self, coarse=False)
dualprompt-pgp/vision_transformer.py:497
Methodincremental_train
(self, data_manager)
clip-pgp/methods/tprompt.py:42
Functioninit_distributed_mode
(args)
l2p-pgp/utils.py:222
Functioninit_distributed_mode
(args)
dualprompt-pgp/utils.py:222
Functioninit_weights_vit_jax
ViT weight initialization, matching JAX (Flax) impl
l2p-pgp/vision_transformer.py:532
Functioninit_weights_vit_jax
ViT weight initialization, matching JAX (Flax) impl
dualprompt-pgp/vision_transformer.py:628
Functioninit_weights_vit_moco
ViT weight initialization, matching moco-v3 impl minus fixed PatchEmbed
l2p-pgp/vision_transformer.py:550
Functioninit_weights_vit_moco
ViT weight initialization, matching moco-v3 impl minus fixed PatchEmbed
dualprompt-pgp/vision_transformer.py:646
Functionlist_dir
List all directories at a given root Args: root (str): Path to directory whose folders need to be listed prefix (bool, optional):
l2p-pgp/continual_datasets/dataset_utils.py:108
Functionlist_dir
List all directories at a given root Args: root (str): Path to directory whose folders need to be listed prefix (bool, optional):
dualprompt-pgp/continual_datasets/dataset_utils.py:108
Functionlist_files
List all files ending with a suffix at a given root Args: root (str): Path to directory whose folders need to be listed suffix (st
l2p-pgp/continual_datasets/dataset_utils.py:129
Functionlist_files
List all files ending with a suffix at a given root Args: root (str): Path to directory whose folders need to be listed suffix (st
dualprompt-pgp/continual_datasets/dataset_utils.py:129
Functionload
Load a CLIP model Parameters ---------- name : str A model name listed by `clip.available_models()`, or the path to a model
clip-pgp/models/clip/clip.py:86
Methodload_pretrained
(self, checkpoint_path, prefix='')
l2p-pgp/vision_transformer.py:430
Methodload_pretrained
(self, checkpoint_path, prefix='')
dualprompt-pgp/vision_transformer.py:489
Methodmedian
(self)
l2p-pgp/utils.py:56
Methodmedian
(self)
dualprompt-pgp/utils.py:56
Methodnb_tasks
(self)
clip-pgp/datasets/data_manager.py:25
Methodno_weight_decay
(self)
l2p-pgp/vision_transformer.py:434
Methodno_weight_decay
(self)
dualprompt-pgp/vision_transformer.py:493
Methodreset_classifier
(self, num_classes: int, global_pool=None)
l2p-pgp/vision_transformer.py:452
Methodreset_classifier
(self, num_classes: int, global_pool=None)
dualprompt-pgp/vision_transformer.py:511
Functionsave_on_master
(*args, **kwargs)
l2p-pgp/utils.py:217
Functionsave_on_master
(*args, **kwargs)
dualprompt-pgp/utils.py:217
Methodset_grad_checkpointing
(self, enable=True)
l2p-pgp/vision_transformer.py:445
Methodset_grad_checkpointing
(self, enable=True)
dualprompt-pgp/vision_transformer.py:504
Methodstem
(x)
clip-pgp/models/clip/model.py:136
Methodsynchronize_between_processes
Warning: does not synchronize the deque!
l2p-pgp/utils.py:42
Methodsynchronize_between_processes
Warning: does not synchronize the deque!
dualprompt-pgp/utils.py:42
Functiontarget_transform
(x, nb_classes)
l2p-pgp/datasets.py:32
Functiontarget_transform
(x, nb_classes)
dualprompt-pgp/datasets.py:30
Functiontokenize
Returns the tokenized representation of given input string(s) Parameters ---------- texts : Union[str, List[str]] An i
clip-pgp/models/clip/clip.py:185
Functionupdate_memory
(representation, threshold, feature=None)
l2p-pgp/memory.py:39
Functionupdate_memory
(representation, threshold, feature=None)
clip-pgp/utils/memory.py:20
Functionupdate_memory_prefix
(represent, threshold, features=None)
dualprompt-pgp/memory.py:57
Methodvalue
(self)
l2p-pgp/utils.py:74
Methodvalue
(self)
dualprompt-pgp/utils.py:74
Functionvit_base_patch16_18x2_224
ViT-Base w/ LayerScale + 18 x 2 (36 block parallel) config. Experimental, may remove. Based on `Three things everyone should know about Vision Tr
l2p-pgp/vision_transformer.py:1140
Functionvit_base_patch16_18x2_224
ViT-Base w/ LayerScale + 18 x 2 (36 block parallel) config. Experimental, may remove. Based on `Three things everyone should know about Vision Tr
dualprompt-pgp/vision_transformer.py:1236
Functionvit_base_patch16_224
ViT-Base (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). ImageNet-1k weights fine-tuned from in21k @ 224x224, source https://g
l2p-pgp/models.py:36
Functionvit_base_patch16_224
ViT-Base (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). ImageNet-1k weights fine-tuned from in21k @ 224x224, source https://g
l2p-pgp/vision_transformer.py:808
Functionvit_base_patch16_224
ViT-Base (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). ImageNet-1k weights fine-tuned from in21k @ 224x224, source https://g
dualprompt-pgp/models.py:36
Functionvit_base_patch16_224
ViT-Base (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). ImageNet-1k weights fine-tuned from in21k @ 224x224, source https://g
dualprompt-pgp/vision_transformer.py:904
Functionvit_base_patch16_224_dino
ViT-Base (ViT-B/16) /w DINO pretrained weights (no head) - https://arxiv.org/abs/2104.14294
l2p-pgp/vision_transformer.py:1048
Functionvit_base_patch16_224_dino
ViT-Base (ViT-B/16) /w DINO pretrained weights (no head) - https://arxiv.org/abs/2104.14294
dualprompt-pgp/vision_transformer.py:1144
Functionvit_base_patch16_224_in21k
ViT-Base model (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). ImageNet-21k weights @ 224x224, source https://github.com/googl
l2p-pgp/vision_transformer.py:957
Functionvit_base_patch16_224_in21k
ViT-Base model (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). ImageNet-21k weights @ 224x224, source https://github.com/googl
dualprompt-pgp/vision_transformer.py:1053
Functionvit_base_patch16_224_miil
ViT-Base (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K
l2p-pgp/vision_transformer.py:1076
Functionvit_base_patch16_224_miil
ViT-Base (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K
dualprompt-pgp/vision_transformer.py:1172
Functionvit_base_patch16_224_miil_in21k
ViT-Base (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K
l2p-pgp/vision_transformer.py:1066
Functionvit_base_patch16_224_miil_in21k
ViT-Base (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). Weights taken from: https://github.com/Alibaba-MIIL/ImageNet21K
dualprompt-pgp/vision_transformer.py:1162
Functionvit_base_patch16_224_sam
ViT-Base (ViT-B/16) w/ SAM pretrained weights. Paper: https://arxiv.org/abs/2106.01548
l2p-pgp/vision_transformer.py:1012
Functionvit_base_patch16_224_sam
ViT-Base (ViT-B/16) w/ SAM pretrained weights. Paper: https://arxiv.org/abs/2106.01548
dualprompt-pgp/vision_transformer.py:1108
Functionvit_base_patch16_384
ViT-Base model (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). ImageNet-1k weights fine-tuned from in21k @ 384x384, source htt
l2p-pgp/vision_transformer.py:818
Functionvit_base_patch16_384
ViT-Base model (ViT-B/16) from original paper (https://arxiv.org/abs/2010.11929). ImageNet-1k weights fine-tuned from in21k @ 384x384, source htt
dualprompt-pgp/vision_transformer.py:914
Functionvit_base_patch16_plus_240
ViT-Base (ViT-B/16+)
l2p-pgp/vision_transformer.py:1097
Functionvit_base_patch16_plus_240
ViT-Base (ViT-B/16+)
dualprompt-pgp/vision_transformer.py:1193
Functionvit_base_patch16_rpn_224
ViT-Base (ViT-B/16) w/ residual post-norm
l2p-pgp/vision_transformer.py:1106
Functionvit_base_patch16_rpn_224
ViT-Base (ViT-B/16) w/ residual post-norm
dualprompt-pgp/vision_transformer.py:1202
Functionvit_base_patch32_224
ViT-Base (ViT-B/32) from original paper (https://arxiv.org/abs/2010.11929). ImageNet-1k weights fine-tuned from in21k, source https://github.com/
l2p-pgp/vision_transformer.py:788
← previousnext →301–400 of 467, ranked by callers