MCPcopy Create free account

hub / github.com/caoql98/DCPL / functions

Functions184 in github.com/caoql98/DCPL

↓ 11 callersMethodsubsample_classes
Divide classes into two groups. The first group represents base classes while the second group represents new classes. Args:
datasets/oxford_pets.py:141
↓ 9 callersMethod__init__
(self, embed_dim: int, # vision image_resolution: int,
clip/model.py:480
↓ 9 callersMethodread_split
(filepath, path_prefix)
datasets/oxford_pets.py:123
↓ 9 callersMethodsave_split
(train, val, test, filepath, path_prefix)
datasets/oxford_pets.py:100
↓ 6 callersMethodencode
(self, text)
clip/simple_tokenizer.py:121
↓ 5 callersMethodread_classnames
Return a dictionary containing key-value pairs of <folder name>: <class name>.
datasets/imagenet.py:64
↓ 4 callersMethod_make_layer
(self, planes, blocks, stride=1)
clip/model.py:126
↓ 4 callersMethodencode_text
(self, text)
clip/model.py:598
↓ 4 callersMethodread_and_split_data
(image_dir, p_trn=0.5, p_val=0.2, ignored=[], new_cnames=None)
datasets/dtd.py:54
↓ 4 callersMethodsplit_trainval
(trainval, p_val=0.2)
datasets/oxford_pets.py:77
↓ 3 callersFunctionload_clip_to_cpu
(cfg)
trainers/vpt.py:21
↓ 3 callersMethodread_data
(self, cname2lab, split_file)
datasets/fgvc_aircraft.py:56
↓ 2 callersMethod__init__
(self, cfg, classnames, clip_model)
trainers/DCPL.py:199
↓ 2 callersMethod__init__
(self, cfg, classnames, clip_model)
trainers/independentVL.py:155
↓ 2 callersMethod__init__
(self, cfg, classnames, clip_model)
trainers/coop.py:189
↓ 2 callersMethod__init__
(self, cfg, classnames, clip_model)
trainers/maple.py:180
↓ 2 callersMethod__init__
(self, cfg, classnames, clip_model)
trainers/cocoop.py:168
↓ 2 callersFunction_transform
(n_px)
clip/clip.py:71
↓ 2 callersMethodbuild_model
(self)
trainers/vpt.py:122
↓ 2 callersFunctionbytes_to_unicode
Returns list of utf-8 byte and a corresponding list of unicode strings. The reversible bpe codes work on unicode strings. This means you
clip/simple_tokenizer.py:16
↓ 2 callersMethodencode_image
(self, image)
clip/model.py:595
↓ 2 callersFunctionget_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
clip/simple_tokenizer.py:38
↓ 2 callersFunctionparse_function
(*metrics, directory="", args=None, end_signal=None)
parse_test_res.py:64
↓ 2 callersFunctionpatch_device
(module)
clip/clip.py:136
↓ 2 callersFunctionpatch_float
(module)
clip/clip.py:160
↓ 2 callersMethodread_data
(self, classnames, split_dir)
datasets/imagenet.py:78
↓ 2 callersMethodread_data
(self, split_file)
datasets/oxford_pets.py:56
↓ 2 callersMethodread_data
(self, cname2lab, text_file)
datasets/sun397.py:61
↓ 2 callersMethodread_data
(self, cname2lab, text_file)
datasets/ucf101.py:64
↓ 2 callersMethodread_data
(self, image_dir, anno_file, meta_file)
datasets/stanford_cars.py:57
↓ 1 callersMethod__init__
(self, cfg, classnames, clip_model)
trainers/vpt.py:93
↓ 1 callersFunction_download
(url: str, root: str = os.path.expanduser("~/.cache/clip"))
clip/clip.py:39
↓ 1 callersFunction_get_clones
(module, N)
trainers/DCPL.py:268
↓ 1 callersFunction_get_clones
(module, N)
trainers/maple.py:207
↓ 1 callersMethodattention
(self, x: torch.Tensor)
clip/model.py:181
↓ 1 callersMethodattention
(self, x: torch.Tensor)
clip/model.py:225
↓ 1 callersMethodattention
(self, x: torch.Tensor)
clip/model.py:283
↓ 1 callersFunctionavailable_models
Returns the names of available CLIP models
clip/clip.py:81
↓ 1 callersFunctionbasic_clean
(text)
clip/simple_tokenizer.py:50
↓ 1 callersFunctionbinary_search
(c_left, c_right, seed, step, test_acc_step_list)
lpclip/linear_probe.py:69
↓ 1 callersMethodbpe
(self, token)
clip/simple_tokenizer.py:80
↓ 1 callersMethodbuild_attention_mask
(self)
clip/model.py:583
↓ 1 callersFunctionbuild_model
(state_dict: dict, design_details)
clip/model.py:654
↓ 1 callersMethodbuild_model
(self)
trainers/DCPL.py:277
↓ 1 callersMethodbuild_model
(self)
trainers/independentVL.py:187
↓ 1 callersMethodbuild_model
(self)
trainers/coop.py:225
↓ 1 callersMethodbuild_model
(self)
trainers/maple.py:216
↓ 1 callersMethodbuild_model
(self)
trainers/cocoop.py:205
↓ 1 callersFunctioncompute_ci95
(res)
parse_test_res.py:60
↓ 1 callersMethodconstruct_prompts
(self, ctx, prefix, suffix, label=None)
trainers/DCPL.py:144
↓ 1 callersMethodconstruct_prompts
(self, ctx, prefix, suffix, label=None)
trainers/independentVL.py:121
↓ 1 callersMethodconstruct_prompts
(self, ctx, prefix, suffix, label=None)
trainers/maple.py:138
↓ 1 callersMethodconstruct_prompts
(self, ctx, prefix, suffix, label=None)
trainers/cocoop.py:126
↓ 1 callersFunctionconvert_weights
Convert applicable model parameters to fp16
clip/model.py:630
↓ 1 callersMethoddecode
(self, tokens)
clip/simple_tokenizer.py:129
↓ 1 callersFunctiondefault_bpe
()
clip/simple_tokenizer.py:11
↓ 1 callersFunctionextend_cfg
Add new config variables. E.g. from yacs.config import CfgNode as CN cfg.TRAINER.MY_MODEL = CN() cfg.TRAINER.MY_MODE
train.py:79
↓ 1 callersFunctionextend_cfg
Add new config variables. E.g. from yacs.config import CfgNode as CN cfg.TRAINER.MY_MODEL = CN() cfg.TRAINER.MY_MODE
lpclip/feat_extractor.py:65
↓ 1 callersMethodforward
(self, image, text)
clip/model.py:613
↓ 1 callersMethodinitialize_parameters
(self)
clip/model.py:554
↓ 1 callersFunctionload_clip_to_cpu
(cfg)
trainers/DCPL.py:21
↓ 1 callersFunctionload_clip_to_cpu
(cfg)
trainers/independentVL.py:21
↓ 1 callersFunctionload_clip_to_cpu
(cfg)
trainers/coop.py:19
↓ 1 callersFunctionload_clip_to_cpu
(cfg)
trainers/maple.py:21
↓ 1 callersFunctionload_clip_to_cpu
(cfg)
trainers/cocoop.py:21
↓ 1 callersFunctionload_clip_to_cpu
(backbone_name="ViT-B/16")
interpret_prompts/interpret_prompt.py:11
↓ 1 callersMethodload_model
(self, directory, epoch=None)
trainers/vpt.py:207
↓ 1 callersFunctionmain
(args)
train.py:155
↓ 1 callersFunctionmain
(args, end_signal)
parse_test_res.py:126
↓ 1 callersFunctionmain
(args)
lpclip/feat_extractor.py:105
↓ 1 callersMethodparse_batch_train
(self, batch)
trainers/DCPL.py:358
↓ 1 callersMethodparse_batch_train
(self, batch)
trainers/independentVL.py:265
↓ 1 callersMethodparse_batch_train
(self, batch)
trainers/vpt.py:200
↓ 1 callersMethodparse_batch_train
(self, batch)
trainers/coop.py:289
↓ 1 callersMethodparse_batch_train
(self, batch)
trainers/maple.py:294
↓ 1 callersMethodparse_batch_train
(self, batch)
trainers/cocoop.py:279
↓ 1 callersFunctionprint_args
(args, cfg)
train.py:33
↓ 1 callersFunctionprint_args
(args, cfg)
lpclip/feat_extractor.py:34
↓ 1 callersMethodread_data
(self)
datasets/oxford_flowers.py:57
↓ 1 callersMethodread_data
(self, classnames)
datasets/imagenetv2.py:31
↓ 1 callersMethodread_data
(self, classnames)
datasets/imagenet_sketch.py:30
↓ 1 callersMethodread_data
(self, classnames)
datasets/imagenet_r.py:32
↓ 1 callersMethodread_data
(self, classnames)
datasets/imagenet_a.py:32
↓ 1 callersFunctionreset_cfg
(cfg, args)
train.py:47
↓ 1 callersFunctionreset_cfg
(cfg, args)
lpclip/feat_extractor.py:48
↓ 1 callersMethodreturn_fixed_embeddings
(self)
trainers/vpt.py:88
↓ 1 callersFunctionsetup_cfg
(args)
train.py:132
↓ 1 callersFunctionsetup_cfg
(args)
lpclip/feat_extractor.py:85
↓ 1 callersFunctionwhitespace_clean
(text)
clip/simple_tokenizer.py:56
Method__init__
(self, bpe_path: str = default_bpe())
clip/simple_tokenizer.py:63
Method__init__
(self, inplanes, planes, stride=1)
clip/model.py:13
Method__init__
(self, spacial_dim: int, embed_dim: int, num_heads: int, output_dim: int = None)
clip/model.py:57
Method__init__
(self, layers, output_dim, heads, input_resolution=224, width=64)
clip/model.py:101
Method__init__
(self, d_model: int, n_head: int, attn_mask: torch.Tensor = None)
clip/model.py:168
Method__init__
(self, d_model: int, n_head: int, attn_mask: torch.Tensor = None, add_prompt=False, text_laye
clip/model.py:192
Method__init__
(self, d_model: int, n_head: int, attn_mask: torch.Tensor = None, design_details=None, text_l
clip/model.py:260
Method__init__
(self, width: int, layers: int, heads: int, attn_mask: torch.Tensor = None, prompts_needed=0,
clip/model.py:335
Method__init__
(self, input_resolution: int, patch_size: int, width: int, layers: int, heads: int, output_di
clip/model.py:363
Method__init__
(self, input_resolution: int, patch_size: int, width: int, layers: int, heads: int, output_dim: int,
clip/model.py:426
Method__init__
(self, clip_model)
trainers/DCPL.py:44
next →1–100 of 184, ranked by callers