Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JingyangQiao/prompt-gradient-projection
/ functions
Functions
467 in github.com/JingyangQiao/prompt-gradient-projection
⨍
Functions
467
◇
Types & classes
61
Method
forward
(self, x, task_id=-1, cls_features=None, train=False)
l2p-pgp/vision_transformer.py:516
Method
forward
(self, image)
clip-pgp/models/tclip.py:41
Method
forward
(self, prompts, tokenized_prompts)
clip-pgp/models/clip/prompt_learner.py:34
Method
forward
(self)
clip-pgp/models/clip/prompt_learner.py:95
Method
forward
(self, x: torch.Tensor)
clip-pgp/models/clip/model.py:40
Method
forward
(self, x)
clip-pgp/models/clip/model.py:66
Method
forward
(self, x)
clip-pgp/models/clip/model.py:135
Method
forward
(self, x: torch.Tensor)
clip-pgp/models/clip/model.py:156
Method
forward
(self, x: torch.Tensor)
clip-pgp/models/clip/model.py:163
Method
forward
(self, x: torch.Tensor)
clip-pgp/models/clip/model.py:185
Method
forward
(self, x: torch.Tensor)
clip-pgp/models/clip/model.py:198
Method
forward
(self, x: torch.Tensor, instance_tokens=None)
clip-pgp/models/clip/model.py:221
Method
forward
(self, x_embed, prompt_mask=None, cls_features=None)
dualprompt-pgp/prompt.py:74
Method
forward
(self, x, prompt)
dualprompt-pgp/attention.py:26
Method
forward
(self, x, *args)
dualprompt-pgp/vision_transformer.py:209
Method
forward
(self, x)
dualprompt-pgp/vision_transformer.py:230
Method
forward
(self, x, prompt=None)
dualprompt-pgp/vision_transformer.py:251
Method
forward
(self, x)
dualprompt-pgp/vision_transformer.py:281
Method
forward
(self, x)
dualprompt-pgp/vision_transformer.py:321
Method
forward
(self, x, task_id=-1, cls_features=None, train=False)
dualprompt-pgp/vision_transformer.py:612
Method
freeze
(self)
clip-pgp/models/tclip.py:95
Function
get_args_parser
(subparsers)
l2p-pgp/configs/cifar100_10_l2p_pgp.py:4
Function
get_args_parser
(subparsers)
l2p-pgp/configs/cifar100_20_l2p_pgp.py:4
Function
get_args_parser
(subparsers)
l2p-pgp/configs/tinyimagenet_l2p_pgp.py:4
Function
get_args_parser
(subparsers)
dualprompt-pgp/configs/cifar100_10_dualprompt_pgp.py:4
Function
get_args_parser
(subparsers)
dualprompt-pgp/configs/tinyimagenet_dualprompt_pgp.py:4
Function
get_args_parser
(subparsers)
dualprompt-pgp/configs/cifar100_20_dualprompt_pgp.py:4
Function
get_args_parser
(subparsers)
dualprompt-pgp/configs/imr_dualprompt_pgp.py:4
Method
get_classifier
(self)
l2p-pgp/vision_transformer.py:449
Method
get_classifier
(self)
dualprompt-pgp/vision_transformer.py:508
Function
get_model
(model_name, args)
clip-pgp/utils/factory.py:4
Function
get_prefix_matrix
(data_loader, model, device)
dualprompt-pgp/memory.py:6
Function
get_rep
(model, original_model, mem_example, task_id)
l2p-pgp/memory.py:18
Function
get_representation_matrix
(data_loader, device)
l2p-pgp/memory.py:5
Function
get_representation_matrix
(data_loader, device)
clip-pgp/utils/memory.py:5
Function
get_world_size
()
l2p-pgp/utils.py:201
Function
get_world_size
()
dualprompt-pgp/utils.py:201
Method
global_avg
(self)
l2p-pgp/utils.py:66
Method
global_avg
(self)
dualprompt-pgp/utils.py:66
Method
group_matcher
(self, coarse=False)
l2p-pgp/vision_transformer.py:438
Method
group_matcher
(self, coarse=False)
dualprompt-pgp/vision_transformer.py:497
Method
incremental_train
(self, data_manager)
clip-pgp/methods/tprompt.py:42
Function
init_distributed_mode
(args)
l2p-pgp/utils.py:222
Function
init_distributed_mode
(args)
dualprompt-pgp/utils.py:222
Function
init_weights_vit_jax
ViT weight initialization, matching JAX (Flax) impl
l2p-pgp/vision_transformer.py:532
Function
init_weights_vit_jax
ViT weight initialization, matching JAX (Flax) impl
dualprompt-pgp/vision_transformer.py:628
Function
init_weights_vit_moco
ViT weight initialization, matching moco-v3 impl minus fixed PatchEmbed
l2p-pgp/vision_transformer.py:550
Function
init_weights_vit_moco
ViT weight initialization, matching moco-v3 impl minus fixed PatchEmbed
dualprompt-pgp/vision_transformer.py:646
Function
list_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
Function
list_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
Function
list_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
Function
list_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
Function
load
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
Method
load_pretrained
(self, checkpoint_path, prefix='')
l2p-pgp/vision_transformer.py:430
Method
load_pretrained
(self, checkpoint_path, prefix='')
dualprompt-pgp/vision_transformer.py:489
Method
median
(self)
l2p-pgp/utils.py:56
Method
median
(self)
dualprompt-pgp/utils.py:56
Method
nb_tasks
(self)
clip-pgp/datasets/data_manager.py:25
Method
no_weight_decay
(self)
l2p-pgp/vision_transformer.py:434
Method
no_weight_decay
(self)
dualprompt-pgp/vision_transformer.py:493
Method
reset_classifier
(self, num_classes: int, global_pool=None)
l2p-pgp/vision_transformer.py:452
Method
reset_classifier
(self, num_classes: int, global_pool=None)
dualprompt-pgp/vision_transformer.py:511
Function
save_on_master
(*args, **kwargs)
l2p-pgp/utils.py:217
Function
save_on_master
(*args, **kwargs)
dualprompt-pgp/utils.py:217
Method
set_grad_checkpointing
(self, enable=True)
l2p-pgp/vision_transformer.py:445
Method
set_grad_checkpointing
(self, enable=True)
dualprompt-pgp/vision_transformer.py:504
Method
stem
(x)
clip-pgp/models/clip/model.py:136
Method
synchronize_between_processes
Warning: does not synchronize the deque!
l2p-pgp/utils.py:42
Method
synchronize_between_processes
Warning: does not synchronize the deque!
dualprompt-pgp/utils.py:42
Function
target_transform
(x, nb_classes)
l2p-pgp/datasets.py:32
Function
target_transform
(x, nb_classes)
dualprompt-pgp/datasets.py:30
Function
tokenize
Returns the tokenized representation of given input string(s) Parameters ---------- texts : Union[str, List[str]] An i
clip-pgp/models/clip/clip.py:185
Function
update_memory
(representation, threshold, feature=None)
l2p-pgp/memory.py:39
Function
update_memory
(representation, threshold, feature=None)
clip-pgp/utils/memory.py:20
Function
update_memory_prefix
(represent, threshold, features=None)
dualprompt-pgp/memory.py:57
Method
value
(self)
l2p-pgp/utils.py:74
Method
value
(self)
dualprompt-pgp/utils.py:74
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_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
Function
vit_base_patch16_plus_240
ViT-Base (ViT-B/16+)
l2p-pgp/vision_transformer.py:1097
Function
vit_base_patch16_plus_240
ViT-Base (ViT-B/16+)
dualprompt-pgp/vision_transformer.py:1193
Function
vit_base_patch16_rpn_224
ViT-Base (ViT-B/16) w/ residual post-norm
l2p-pgp/vision_transformer.py:1106
Function
vit_base_patch16_rpn_224
ViT-Base (ViT-B/16) w/ residual post-norm
dualprompt-pgp/vision_transformer.py:1202
Function
vit_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
← previous
next →
301–400 of 467, ranked by callers