Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CHENGY12/PLOT
/ functions
Functions
329 in github.com/CHENGY12/PLOT
⨍
Functions
329
◇
Types & classes
88
↓ 52 callers
Method
generate_fewshot_dataset
Generate a few-shot dataset (typically for the training set). This function is useful when one wants to evaluate a model in a few-sho
plot-adapter/datasets/utils.py:210
↓ 22 callers
Function
listdir_nohidden
List non-hidden items in a directory. Args: path (str): directory path. sort (bool): sort the items.
plot-adapter/datasets/utils.py:53
↓ 11 callers
Method
subsample_classes
Divide classes into two groups. The first group represents base classes while the second group represents new classes. Args:
plot-pp/datasets/oxford_pets.py:141
↓ 11 callers
Method
subsample_classes
Divide classes into two groups. The first group represents base classes while the second group represents new classes. Args:
plot-coop/datasets/oxford_pets.py:141
↓ 9 callers
Function
cls_acc
(output, target, topk=1)
plot-adapter/utils.py:61
↓ 9 callers
Method
read_split
(filepath, path_prefix)
plot-pp/datasets/oxford_pets.py:123
↓ 9 callers
Method
read_split
(filepath, path_prefix)
plot-adapter/datasets/oxford_pets.py:106
↓ 9 callers
Method
read_split
(filepath, path_prefix)
plot-coop/datasets/oxford_pets.py:123
↓ 9 callers
Method
save_split
(train, val, test, filepath, path_prefix)
plot-pp/datasets/oxford_pets.py:100
↓ 9 callers
Method
save_split
(train, val, test, filepath, path_prefix)
plot-coop/datasets/oxford_pets.py:100
↓ 9 callers
Function
tip_plot
(cfg, image_features_map,adapter,batch_size,beta)
plot-adapter/utils.py:26
↓ 6 callers
Method
__init__
(self, embed_dim: int, # vision image_resolution: int,
plot-pp/clip/model.py:302
↓ 6 callers
Method
__init__
(self, embed_dim: int, # vision image_resolution: int,
plot-adapter/clip/model.py:240
↓ 6 callers
Method
__init__
(self, embed_dim: int, # vision image_resolution: int,
plot-coop/clip/model.py:291
↓ 6 callers
Function
read_json
Read json file from a path.
plot-adapter/datasets/utils.py:15
↓ 5 callers
Method
read_classnames
Return a dictionary containing key-value pairs of <folder name>: <class name>.
plot-pp/datasets/imagenet.py:66
↓ 5 callers
Method
read_classnames
Return a dictionary containing key-value pairs of <folder name>: <class name>.
plot-coop/datasets/imagenet.py:66
↓ 4 callers
Method
_make_layer
(self, planes, blocks, stride=1)
plot-pp/clip/model.py:129
↓ 4 callers
Method
_make_layer
(self, planes, blocks, stride=1)
plot-adapter/clip/model.py:126
↓ 4 callers
Method
_make_layer
(self, planes, blocks, stride=1)
plot-coop/clip/model.py:177
↓ 4 callers
Function
build_data_loader
( data_source=None, batch_size=64, input_size=224, tfm=None, is_train=True, shuffle=Fa
plot-adapter/datasets/utils.py:354
↓ 4 callers
Method
read_and_split_data
(image_dir, p_trn=0.5, p_val=0.2, ignored=[], new_cnames=None)
plot-pp/datasets/dtd.py:54
↓ 4 callers
Method
read_and_split_data
(image_dir, p_trn=0.5, p_val=0.2, ignored=[], new_cnames=None)
plot-coop/datasets/dtd.py:54
↓ 4 callers
Method
split_trainval
(trainval, p_val=0.2)
plot-pp/datasets/oxford_pets.py:77
↓ 4 callers
Method
split_trainval
(trainval, p_val=0.2)
plot-coop/datasets/oxford_pets.py:77
↓ 3 callers
Method
encode
(self, text)
plot-adapter/clip/simple_tokenizer.py:121
↓ 3 callers
Function
pre_load_features
(cfg, split, clip_model, loader)
plot-adapter/utils.py:141
↓ 3 callers
Method
read_data
(self, cname2lab, split_file)
plot-pp/datasets/fgvc_aircraft.py:56
↓ 3 callers
Method
read_data
(self, cname2lab, split_file)
plot-adapter/datasets/fgvc.py:35
↓ 3 callers
Method
read_data
(self, cname2lab, split_file)
plot-coop/datasets/fgvc_aircraft.py:56
↓ 3 callers
Function
write_json
Writes to a json file.
plot-adapter/datasets/utils.py:22
↓ 2 callers
Method
__init__
(self, cfg, classnames, clip_model)
plot-pp/trainers/plotpp.py:178
↓ 2 callers
Method
__init__
(self, classnames, clip_model)
plot-adapter/main_imagenet.py:209
↓ 2 callers
Method
__init__
(self, classnames, clip_model)
plot-adapter/main.py:213
↓ 2 callers
Method
__init__
(self, cfg, classnames, clip_model)
plot-coop/trainers/plot.py:197
↓ 2 callers
Function
_download
(url: str, root: str = os.path.expanduser("~/.cache/clip"))
plot-adapter/clip/clip.py:39
↓ 2 callers
Function
_transform
(n_px)
plot-pp/clip/clip.py:71
↓ 2 callers
Function
_transform
(n_px)
plot-adapter/clip/clip.py:71
↓ 2 callers
Function
_transform
(n_px)
plot-coop/clip/clip.py:71
↓ 2 callers
Method
_transform_image
(self, tfm, img0)
plot-adapter/datasets/utils.py:341
↓ 2 callers
Function
available_models
Returns the names of available CLIP models
plot-adapter/clip/clip.py:81
↓ 2 callers
Function
build_cache_model
(cfg, clip_model, train_loader_cache)
plot-adapter/utils.py:89
↓ 2 callers
Function
build_model
(state_dict: dict)
plot-adapter/clip/model.py:395
↓ 2 callers
Function
bytes_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
plot-pp/clip/simple_tokenizer.py:16
↓ 2 callers
Function
bytes_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
plot-adapter/clip/simple_tokenizer.py:16
↓ 2 callers
Function
bytes_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
plot-coop/clip/simple_tokenizer.py:16
↓ 2 callers
Function
clip_classifier
(classnames, template, clip_model)
plot-adapter/utils.py:69
↓ 2 callers
Method
encode
(self, text)
plot-pp/clip/simple_tokenizer.py:121
↓ 2 callers
Method
encode
(self, text)
plot-coop/clip/simple_tokenizer.py:121
↓ 2 callers
Method
encode_text
(self, text)
plot-adapter/clip/model.py:339
↓ 2 callers
Function
get_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
plot-pp/clip/simple_tokenizer.py:38
↓ 2 callers
Function
get_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
plot-adapter/clip/simple_tokenizer.py:38
↓ 2 callers
Function
get_pairs
Return set of symbol pairs in a word. Word is represented as tuple of symbols (symbols being variable-length strings).
plot-coop/clip/simple_tokenizer.py:38
↓ 2 callers
Method
is_input_domain_valid
(self, input_domains)
plot-adapter/datasets/utils.py:180
↓ 2 callers
Function
patch_device
(module)
plot-pp/clip/clip.py:136
↓ 2 callers
Function
patch_device
(module)
plot-adapter/clip/clip.py:136
↓ 2 callers
Function
patch_device
(module)
plot-coop/clip/clip.py:136
↓ 2 callers
Function
patch_float
(module)
plot-pp/clip/clip.py:160
↓ 2 callers
Function
patch_float
(module)
plot-adapter/clip/clip.py:160
↓ 2 callers
Function
patch_float
(module)
plot-coop/clip/clip.py:160
↓ 2 callers
Method
read_data
(self, classnames, split_dir)
plot-pp/datasets/imagenet.py:80
↓ 2 callers
Method
read_data
(self, split_file)
plot-pp/datasets/oxford_pets.py:56
↓ 2 callers
Method
read_data
(self, cname2lab, text_file)
plot-pp/datasets/sun397.py:61
↓ 2 callers
Method
read_data
(self, cname2lab, text_file)
plot-pp/datasets/ucf101.py:64
↓ 2 callers
Method
read_data
(self, image_dir, anno_file, meta_file)
plot-pp/datasets/stanford_cars.py:57
↓ 2 callers
Method
read_data
(self, classnames, split_dir)
plot-coop/datasets/imagenet.py:80
↓ 2 callers
Method
read_data
(self, split_file)
plot-coop/datasets/oxford_pets.py:56
↓ 2 callers
Method
read_data
(self, cname2lab, text_file)
plot-coop/datasets/sun397.py:61
↓ 2 callers
Method
read_data
(self, cname2lab, text_file)
plot-coop/datasets/ucf101.py:64
↓ 2 callers
Method
read_data
(self, image_dir, anno_file, meta_file)
plot-coop/datasets/stanford_cars.py:57
↓ 2 callers
Method
test
(self)
plot-adapter/datasets/utils.py:135
↓ 1 callers
Function
Sinkhorn
(K, u, v)
plot-adapter/utils.py:10
↓ 1 callers
Method
Sinkhorn
(self, K, u, v)
plot-pp/trainers/plotpp.py:199
↓ 1 callers
Method
Sinkhorn
(self, K, u, v)
plot-adapter/main_imagenet.py:226
↓ 1 callers
Method
Sinkhorn
(self, K, u, v)
plot-adapter/main.py:229
↓ 1 callers
Method
Sinkhorn
(self, K, u, v)
plot-coop/trainers/plot.py:214
↓ 1 callers
Function
_download
(url: str, root: str = os.path.expanduser("~/.cache/clip"))
plot-pp/clip/clip.py:39
↓ 1 callers
Function
_download
(url: str, root: str = os.path.expanduser("~/.cache/clip"))
plot-coop/clip/clip.py:39
↓ 1 callers
Method
attention
(self, x: torch.Tensor)
plot-pp/clip/model.py:184
↓ 1 callers
Method
attention
(self, x: torch.Tensor)
plot-adapter/clip/model.py:181
↓ 1 callers
Method
attention
(self, x: torch.Tensor)
plot-coop/clip/model.py:232
↓ 1 callers
Function
available_models
Returns the names of available CLIP models
plot-pp/clip/clip.py:81
↓ 1 callers
Function
available_models
Returns the names of available CLIP models
plot-coop/clip/clip.py:81
↓ 1 callers
Function
basic_clean
(text)
plot-pp/clip/simple_tokenizer.py:50
↓ 1 callers
Function
basic_clean
(text)
plot-adapter/clip/simple_tokenizer.py:50
↓ 1 callers
Function
basic_clean
(text)
plot-coop/clip/simple_tokenizer.py:50
↓ 1 callers
Method
bpe
(self, token)
plot-pp/clip/simple_tokenizer.py:80
↓ 1 callers
Method
bpe
(self, token)
plot-adapter/clip/simple_tokenizer.py:80
↓ 1 callers
Method
bpe
(self, token)
plot-coop/clip/simple_tokenizer.py:80
↓ 1 callers
Method
build_attention_mask
(self)
plot-pp/clip/model.py:386
↓ 1 callers
Method
build_attention_mask
(self)
plot-adapter/clip/model.py:324
↓ 1 callers
Method
build_attention_mask
(self)
plot-coop/clip/model.py:375
↓ 1 callers
Function
build_dataset
(dataset, root_path, shots)
plot-adapter/datasets/__init__.py:27
↓ 1 callers
Function
build_model
(state_dict: dict)
plot-pp/clip/model.py:457
↓ 1 callers
Function
build_model
(state_dict: dict)
plot-coop/clip/model.py:446
↓ 1 callers
Method
build_model
(self)
plot-pp/trainers/plotpp.py:274
↓ 1 callers
Method
build_model
(self)
plot-coop/trainers/plot.py:294
↓ 1 callers
Method
construct_prompts
(self, ctx, prefix, suffix, label=None)
plot-pp/trainers/plotpp.py:140
↓ 1 callers
Function
convert_weights
Convert applicable model parameters to fp16
plot-pp/clip/model.py:433
↓ 1 callers
Function
convert_weights
Convert applicable model parameters to fp16
plot-adapter/clip/model.py:371
next →
1–100 of 329, ranked by callers