Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TPCD/DCCL
/ functions
Functions
480 in github.com/TPCD/DCCL
⨍
Functions
480
◇
Types & classes
94
Method
forward
(self, x)
model/attribute_classifier.py:74
Method
forward
(self, x)
model/attribute_classifier.py:114
Method
forward
(self, inputs, adj)
model/meta_graph.py:34
Method
forward
(self, inputs)
model/meta_graph.py:85
Method
forward
(self, inputs)
model/meta_graph.py:163
Method
forward
(self, x)
model/vision_transformer.py:44
Method
forward
(self, x)
model/vision_transformer.py:58
Method
forward
(self, x)
model/vision_transformer.py:79
Method
forward
(self, x, return_attention=False)
model/vision_transformer.py:106
Method
forward
(self, x)
model/vision_transformer.py:129
Method
forward
(self, x, return_all_patches=False)
model/vision_transformer.py:210
Method
forward
(self, x)
model/vision_transformer.py:294
Method
forward
(self, x, return_features=False)
model/vision_transformer.py:310
Method
forward
(self, x)
model/vision_transformer.py:384
Method
forward
(self, x)
model/vision_transformer.py:453
Method
forward
(self, x)
model/vision_transformer.py:524
Method
forward
(self, x)
model/vision_transformer.py:602
Method
forward
(self, x)
model/vision_transformer.py:666
Method
forward
(self, x)
model/vision_transformer.py:725
Method
forward
(self, x)
model/vision_transformer.py:769
Method
forward
(self, x)
model/vision_transformer.py:801
Method
forward
(self, x, use_log_softmax=False)
model/vision_transformer.py:837
Method
forward
Compute loss for model. If both `labels` and `mask` are None, it degenerates to SimCLR unsupervised loss: https://arxiv.org/pdf/2002.0
methods/representation_learning/representation_learning.py:46
Function
get_2d_sincos_pos_embed
grid_size: int of the grid height and width return: pos_embed: [grid_size*grid_size, embed_dim] or [1+grid_size*grid_size, embed_dim] (w/
project_utils/pos_embed.py:11
Function
get_acc_auroc_curves
:param logdir: Path to logs: E.g '/work/sagar/open_set_recognition/methods/ARPL/log/(12.03.2021_|_32.570)/' :return:
project_utils/general_utils.py:281
Function
get_cifar_10_90_datasets
(train_transform, test_transform, train_classes=range(10), prop_train_labels=0.1, split
data/cifar.py:532
Function
get_cifar_10_datasets
(train_transform, test_transform, train_classes=(0, 1, 8, 9), prop_train_labels=0.5, sp
data/cifar.py:97
Function
get_cifar_20_80_datasets
(train_transform, test_transform, train_classes=range(20), prop_train_labels=0.2, split
data/cifar.py:492
Function
get_cifar_30_70_datasets
(train_transform, test_transform, train_classes=range(30), prop_train_labels=0.3, split
data/cifar.py:452
Function
get_cifar_40_60_datasets
(train_transform, test_transform, train_classes=range(40), prop_train_labels=0.4, split
data/cifar.py:412
Function
get_cifar_50_50_datasets
(train_transform, test_transform, train_classes=range(50), prop_train_labels=0.5, split
data/cifar.py:374
Function
get_cifar_50_datasets
(train_transform, test_transform, train_classes=range(50), prop_train_labels=0.5, split
data/cifar.py:179
Function
get_cifar_60_40_datasets
(train_transform, test_transform, train_classes=range(60), prop_train_labels=0.6, split
data/cifar.py:334
Function
get_cifar_70_30_datasets
(train_transform, test_transform, train_classes=range(70), prop_train_labels=0.7, split
data/cifar.py:295
Function
get_cifar_80_20_datasets
(train_transform, test_transform, train_classes=range(80), prop_train_labels=0.8, split
data/cifar.py:257
Function
get_cifar_90_10_datasets
(train_transform, test_transform, train_classes=range(90), prop_train_labels=0.9, split
data/cifar.py:218
Function
get_dino_head_weights
:param pretrain_path: Path to full DINO pretrained checkpoint as in https://github.com/facebookresearch/dino 'full_ckpt' :return: weight
project_utils/general_utils.py:59
Function
get_equal_len_datasets
Make two datasets the same length
data/imagenet.py:82
Method
get_intermediate_layers
(self, x, n=1)
model/vision_transformer.py:232
Method
get_last_selfattention
(self, x)
model/vision_transformer.py:221
Function
get_scheduler
(optimizer, args)
project_utils/schedulers.py:5
Function
get_train_val_indices
(train_dataset, val_split=0.2)
data/flower.py:193
Method
images
(self, bchw_tensor)
project_utils/visualization_utils.py:968
Method
img_grid_many
(self, d)
project_utils/visualization_utils.py:984
Function
interpolate_pos_embed
(model, checkpoint_model)
project_utils/pos_embed.py:66
Function
l2norm
归一化 :param vec: :return:
project_utils/infomap_cluster_utils.py:40
Method
log
(self, *args, **kwargs)
project_utils/visualization_utils.py:965
Method
log
(self, *args, **kwargs)
project_utils/visualization_utils.py:1026
Method
log_state
Gathers the stats from self.trainer.stats and passes them into self.log, as a list
project_utils/visualization_utils.py:885
Function
meta1_base
(pretrain_path, dict_attribute, grad_from_block=11)
model/attribute_transformer.py:1164
Function
meta1_small
(pretrain_path, dict_attribute, grad_from_block=11)
model/attribute_transformer.py:1155
Function
meta2_base
(pretrain_path, dict_attribute, grad_from_block=11)
model/attribute_transformer.py:1182
Function
meta2_small
(pretrain_path, dict_attribute, grad_from_block=11)
model/attribute_transformer.py:1173
Function
mixed_eval
Evaluate clustering metrics on two subsets of data, as defined by the mask 'mask' (Mask usually corresponding to `Old' and `New' classes in G
project_utils/cluster_utils.py:75
Method
normalize_prototypes
(self)
model/vision_transformer.py:322
Function
plot_with_domains
(save_path, lowDWeights, labels)
project_utils/visualization_utils.py:95
Function
plot_with_labels
(save_path, lowDWeights, labels, camid)
project_utils/visualization_utils.py:28
Function
plot_without_labels
(save_path, lowDWeights, labels, camid)
project_utils/visualization_utils.py:320
Function
read_meta
idx2lb:每一个顶点对应一个类 lb2idxs:每个类对应一个id
project_utils/infomap_cluster_utils.py:57
Method
save
(self)
project_utils/general_utils.py:253
Function
seed_torch
(seed=1029)
project_utils/cluster_utils.py:189
Function
split_cluster_acc_v1
Evaluate clustering metrics on two subsets of data, as defined by the mask 'mask' (Mask usually corresponding to `Old' and `New' classes in G
project_utils/cluster_and_log_utils.py:6
Function
split_cluster_acc_v2
Calculate clustering accuracy. Require scikit-learn installed First compute linear assignment on all data, then look at how good the accuracy
project_utils/cluster_and_log_utils.py:29
Method
split_for_val
(self, l_feats, l_targets, val_prop=0.2)
methods/clustering/faster_mix_k_means_pytorch.py:61
Method
step
(self, epoch=None)
project_utils/schedulers.py:105
Function
str2bool
(v)
project_utils/general_utils.py:201
Function
str2bool
(v)
project_utils/cluster_utils.py:200
Method
supp_idxs
(c)
methods/clustering/faster_mix_k_means_pytorch.py:163
Function
test_kmeans_for_scipy
In this case, the test loader needs to have the labelled and unlabelled subsets of the training data
methods/estimate_k/estimate_k.py:94
Function
to_numpy
(tensor)
project_utils/contrastive_utils.py:12
Function
transform_moco_state_dict
:param obj: Moco State Dict :param args: argsparse object with training classes :return: State dict compatable with standard resnet archi
project_utils/general_utils.py:93
Method
update
(self, preds, labels=None)
project_utils/general_utils.py:227
Method
update
(self, val, n=1)
project_utils/cluster_utils.py:129
Function
visualize2
(features_path, output_path, show_num_identities_for_each_domain=100)
project_utils/visualization_utils.py:643
Function
visualize3
(features_path, output_path, show_num_identities_for_each_domain=100, plot_by_domain=False, if_
project_utils/visualization_utils.py:723
Function
visualize_gcd
(features_path, output_path, show_num_identities_for_each_domain, if_reduce_dim_before_select=False, if_from_n
project_utils/visualization_utils.py:544
Function
vit_tiny
(patch_size=16, **kwargs)
model/vision_transformer.py:243
Method
viz
(self)
project_utils/visualization_utils.py:857
Function
weights_init_classifier
(m)
model/vision_transformer.py:642
Function
weights_init_kaiming
(m)
model/vision_transformer.py:627
← previous
401–480 of 480, ranked by callers