MCPcopy Create free account

hub / github.com/TPCD/DCCL / functions

Functions480 in github.com/TPCD/DCCL

↓ 49 callersFunctionsubsample_dataset
(dataset, idxs)
data/cifar.py:45
↓ 29 callersMethodsave
(self, *args, **kwargs)
project_utils/visualization_utils.py:908
↓ 20 callersFunctionsubsample_instances
(dataset, prop_indices_to_subsample=0.8)
data/data_utils.py:5
↓ 19 callersMethod__init__
(self, vit_backbone_model, grad_from_block=11)
model/attribute_transformer.py:71
↓ 18 callersMethodupdate
(self, val, n=1)
project_utils/general_utils.py:24
↓ 16 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
model/vision_transformer.py:49
↓ 16 callersFunctionvit_small
(patch_size=16, **kwargs)
model/vision_transformer.py:250
↓ 15 callersFunctionvit_base
(patch_size=16, **kwargs)
model/vision_transformer.py:257
↓ 12 callersFunctionget_train_val_indices
(train_dataset, val_split=0.2)
data/cifar.py:77
↓ 12 callersFunctionsubsample_classes
(dataset, include_classes=(0, 1, 8, 9))
data/cifar.py:62
↓ 10 callersFunctioncluster_acc
Calculate clustering accuracy. Require scikit-learn installed # Arguments y: true labels, numpy.array with shape `(n_samples,)`
project_utils/cluster_utils.py:39
↓ 9 callersFunctionlog_accs_from_preds
Given a list of evaluation functions to use (e.g ['v1', 'v2']) evaluate and log ACC results :param y_true: GT labels :param y_pred: Pred
project_utils/cluster_and_log_utils.py:81
↓ 8 callersMethodstep
(self, *args, **kwargs)
project_utils/schedulers.py:74
↓ 7 callersMethodfit
(self, X)
methods/clustering/faster_mix_k_means_pytorch.py:219
↓ 7 callersFunctionget_class_splits
(args)
data/get_datasets.py:122
↓ 7 callersFunctionget_datasets
:return: train_dataset: MergedDataset which concatenates labelled and unlabelled test_dataset, unlabelled_train_example
data/get_datasets.py:71
↓ 7 callersFunctionget_mean_lr
(optimizer)
project_utils/general_utils.py:300
↓ 7 callersFunctionsubsample_dataset
(dataset, idxs)
data/imagenet.py:27
↓ 6 callersMethod__init__
/path/to/log_file.txt
project_utils/visualization_utils.py:831
↓ 6 callersMethodfit_mix
(self, u_feats, l_feats, l_targets)
methods/clustering/faster_mix_k_means_pytorch.py:244
↓ 6 callersFunctionget_transform
(transform_type='default', image_size=32, args=None)
data/augmentations/__init__.py:5
↓ 6 callersFunctionrelabel_numpy
(pids_array, if_reture_dict=False)
project_utils/visualization_utils.py:807
↓ 6 callersFunctiontest_kmeans_semi_sup
In this case, the test loader needs to have the labelled and unlabelled subsets of the training data
project_utils/k_means_utils.py:22
↓ 5 callersFunctionTruncated_initializer
(m)
model/meta_graph.py:5
↓ 5 callersFunctionsubsample_dataset
(dataset, idxs)
data/pets.py:155
↓ 5 callersFunctionsubsample_dataset
(dataset, idxs)
data/food.py:131
↓ 5 callersFunctionsubsample_dataset
(dataset, idxs)
data/cub.py:136
↓ 5 callersFunctionsubsample_dataset
(dataset, idxs)
data/fgvc_aircraft.py:168
↓ 5 callersFunctionsubsample_dataset
(dataset, idxs)
data/herbarium_19.py:27
↓ 5 callersFunctionsubsample_dataset
(dataset, idxs)
data/stanford_cars.py:70
↓ 5 callersFunctiontest_kmeans
(model, test_loader, epoch, save_name, device, args, logger_class=None, output
project_utils/k_means_utils.py:215
↓ 4 callersFunctionget_cmap
Returns a function that maps each index in 0, 1, ..., n-1 to a distinct RGB color; the keyword argument name must be a standard mpl colormap name.
project_utils/visualization_utils.py:22
↓ 4 callersFunctioninit_experiment
(args, runner_name=None, exp_id=None)
project_utils/general_utils.py:123
↓ 4 callersFunctionplot_2D_embedding
(save_path, lowDWeights, labels)
project_utils/visualization_utils.py:245
↓ 4 callersFunctiontest_kmeans
In this case, the test loader needs to have the labelled and unlabelled subsets of the training data
methods/estimate_k/estimate_k.py:26
↓ 4 callersFunctiontime_now
return current time in format of 2000-01-01 12:01:01
project_utils/visualization_utils.py:18
↓ 3 callersFunctionNo_index
(a, b)
project_utils/sampler.py:14
↓ 3 callersMethod_correlation
(self, A, B)
model/meta_graph.py:127
↓ 3 callersMethod_correlation
(self, A, B)
model/meta_graph.py:217
↓ 3 callersMethod_reset
Resets num_bad_epochs counter and cooldown counter.
project_utils/general_utils.py:324
↓ 3 callersMethod_viz_prototype
Outputs a function which will log the arguments to Visdom in an appropriate way. Args: vis_fn: A function, such as self.
project_utils/visualization_utils.py:871
↓ 3 callersFunctionintdict2ndarray
(d, default_val=-1)
project_utils/infomap_cluster_utils.py:50
↓ 3 callersMethodlog
(self, *args, **kwargs)
project_utils/visualization_utils.py:939
↓ 3 callersMethodlog
(self, msg, *args, **kwargs)
project_utils/visualization_utils.py:1090
↓ 3 callersFunctionpairwise_distance
r''' using broadcast mechanism to calculate pairwise ecludian distance of data the input data is N*M matrix, where M is the dimension we f
methods/clustering/faster_mix_k_means_pytorch.py:9
↓ 3 callersMethodprepare_tokens
(self, x)
model/vision_transformer.py:197
↓ 3 callersFunctionsubsample_classes
(dataset, include_classes=list(range(1000)))
data/imagenet.py:48
↓ 3 callersFunctionsubsample_dataset
(dataset, idxs)
data/flower.py:168
↓ 2 callersMethod__init__
(self, data_source, num_instances)
project_utils/sampler.py:20
↓ 2 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
model/attribute_classifier.py:65
↓ 2 callersMethod__init__
(self, hidden_dim, input_dim, sigma=2.0, proto_graph_vertex_num=16, meta_graph_vertex_num=128)
model/meta_graph.py:56
↓ 2 callersMethod_check_exists
(self)
data/pets.py:141
↓ 2 callersMethod_check_exists
(self)
data/food.py:123
↓ 2 callersMethod_check_integrity
(self)
data/cub.py:90
↓ 2 callersMethod_check_integrity
(self)
data/flower.py:146
↓ 2 callersMethod_construct_graph
(self, A, B)
model/meta_graph.py:116
↓ 2 callersMethod_init_is_better
(self, mode, threshold, threshold_mode)
project_utils/general_utils.py:364
↓ 2 callersFunctionaugment_list
()
data/augmentations/randaugment.py:163
↓ 2 callersMethodbackward
(ctx, grad_outputs)
project_utils/cluster_memory_utils.py:21
↓ 2 callersFunctiongenerate_cluster_features
(labels, features)
project_utils/infomap_cluster_utils.py:356
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
embed_dim: output dimension for each position pos: a list of positions to be encoded: size (M,) out: (M, D)
project_utils/pos_embed.py:40
↓ 2 callersFunctionget_imagenet_100_datasets
(train_transform, test_transform, train_classes=range(80), prop_train_labels=0.8, s
data/imagenet.py:100
↓ 2 callersFunctionget_links
(single, links, nbrs, dists, min_sim)
project_utils/infomap_cluster_utils.py:96
↓ 2 callersFunctioninfo_nce_logits
(features, args)
methods/representation_learning/representation_learning.py:137
↓ 2 callersMethodkpp
(self, X, pre_centers=None, k=10, random_state=None)
methods/clustering/faster_mix_k_means_pytorch.py:82
↓ 2 callersMethodnew_epoch
(self)
project_utils/data_utils.py:29
↓ 2 callersFunctionseed_torch
(seed=1029)
project_utils/general_utils.py:32
↓ 2 callersFunctiontest_kmeans
(model, test_loader, epoch, save_name, args)
methods/representation_learning/representation_learning.py:433
↓ 2 callersFunctionto_torch
(ndarray)
project_utils/contrastive_utils.py:21
↓ 1 callersFunctionCutoutAbs
(img, v)
data/augmentations/randaugment.py:129
↓ 1 callersMethod__getitem__
(self, item)
data/cifar.py:17
↓ 1 callersMethod__init__
(self, loader, length=None)
project_utils/data_utils.py:18
↓ 1 callersMethod__init__
(self, T_restart, *args, ** kwargs)
project_utils/schedulers.py:67
↓ 1 callersMethod__init__
(self, *args, **kwargs)
data/cifar.py:11
↓ 1 callersMethod__len__
(self)
data/fgvc_aircraft.py:114
↓ 1 callersMethod_align_output
(self, field_idx, output)
project_utils/visualization_utils.py:1119
↓ 1 callersMethod_check_exists
(self)
data/fgvc_aircraft.py:127
↓ 1 callersMethod_construct_meta_graph
(self, A, B)
model/meta_graph.py:194
↓ 1 callersMethod_construct_proto_graph
(self, A, B)
model/meta_graph.py:205
↓ 1 callersMethod_download
(self)
data/pets.py:148
↓ 1 callersMethod_download
(self)
data/food.py:126
↓ 1 callersMethod_download
(self)
data/cub.py:103
↓ 1 callersMethod_gather_outputs
(self, field, log_fields, stat_parent, stat, require_dict=False)
project_utils/visualization_utils.py:1132
↓ 1 callersMethod_get_single_item
(self, index)
project_utils/data_utils.py:62
↓ 1 callersMethod_join_results
(self, results)
project_utils/visualization_utils.py:1127
↓ 1 callersMethod_load_metadata
(self)
data/cub.py:39
↓ 1 callersFunctionaccuracy
Computes the accuracy over the k top predictions for the specified values of k
project_utils/contrastive_utils.py:104
↓ 1 callersFunctionaccuracy
Computes the accuracy over the k top predictions for the specified values of k
project_utils/general_utils.py:184
↓ 1 callersFunctionaugment_list_svhn
()
data/augmentations/randaugment.py:207
↓ 1 callersFunctionbinary_search
(merge_test_loader, args)
methods/estimate_k/estimate_k.py:157
↓ 1 callersFunctioncluster_by_semi_infomap
基于infomap的聚类 :param nbrs: :param dists: :param pred_label_path: :return:
project_utils/infomap_cluster_utils.py:187
↓ 1 callersFunctioncm
(inputs, indexes, features, momentum=0.5, device=None)
project_utils/cluster_memory_utils.py:35
↓ 1 callersFunctioncm_hard
(inputs, indexes, features, momentum=0.5, device=None)
project_utils/cluster_memory_utils.py:77
↓ 1 callersMethodcreate_compositional_graph
(self, attribute_label)
model/attribute_transformer.py:828
↓ 1 callersFunctioncutout
(mask_size, p, cutout_inside, mask_color=(0, 0, 0))
data/augmentations/cut_out.py:8
↓ 1 callersMethoddownload
Download the FGVC-Aircraft data if it doesn't exist already.
data/fgvc_aircraft.py:131
↓ 1 callersMethoddownload
(self)
data/flower.py:156
↓ 1 callersFunctiondrop_path
(x, drop_prob: float = 0., training: bool = False)
model/vision_transformer.py:26
↓ 1 callersMethodevaluate
(self)
project_utils/general_utils.py:271
↓ 1 callersFunctionextract_features
(model, data_loader, print_freq=50, args=None)
project_utils/contrastive_utils.py:30
next →1–100 of 480, ranked by callers