MCPcopy Create free account

hub / github.com/DanielShalam/BPA / functions

Functions184 in github.com/DanielShalam/BPA

Method__init__
(self, window_size=20, fmt=None)
utils.py:296
Method__init__
(self, delimiter="\t")
utils.py:341
Method__init__
(self, args: dict, bpa: BPA = None)
methods/prototypical/proto_loss.py:11
Method__init__
(self, module)
methods/pt_map/save_plk.py:18
Method__init__
(self, num_way: int, num_shot: int, num_query: int, lam: float)
methods/pt_map/pt_map_loss.py:22
Method__init__
(self, args: dict, lam: float = 10, alpha: float = 0.2, n_epochs: int = 10, bpa=None)
methods/pt_map/pt_map_loss.py:113
Method__init__
(self, n_ways)
methods/pt_map/test_standard.py:46
Method__init__
(self, n_ways, lam, distance_metric: str = 'euclidean')
methods/pt_map/test_standard.py:52
Method__init__
(self, transformdict)
methods/pt_map/data/additional_transforms.py:16
Method__init__
(self, data_file, transform, target_transform=identity)
methods/pt_map/data/dataset.py:15
Method__init__
(self, data_file, batch_size, transform)
methods/pt_map/data/dataset.py:35
Method__init__
(self, sub_meta, cl, transform=transforms.ToTensor(), target_transform=identity)
methods/pt_map/data/dataset.py:65
Method__init__
(self, n_classes, n_way, n_episodes)
methods/pt_map/data/dataset.py:84
Method__init__
(self, image_size, batch_size)
methods/pt_map/data/datamgr.py:51
Method__init__
(self, module)
methods/pt_map/evaluation/save_plk.py:33
Method__init__
(self, n_ways)
methods/pt_map/evaluation/test_standard.py:49
Method__init__
(self, n_ways, lam)
methods/pt_map/evaluation/test_standard.py:54
Method__init__
(self, set_name, labels, num_episodes, num_way, num_shot, num_query, const_loader,
datasets/samplers.py:7
Method__init__
(self, data_path: str, setname: str, backbone: str, augment: bool)
datasets/cifar.py:10
Method__init__
(self, setname, args, augment=False)
datasets/cub.py:19
Method__init__
(self, data_path: str, setname: str, backbone: str, augment: bool)
datasets/mini_imagenet.py:10
Method__init__
(self, indim, outdim)
models/res_mixup_model.py:35
Method__init__
(self, inplanes, planes, stride=1, downsample=None)
models/res_mixup_model.py:63
Method__init__
(self, indim, outdim)
models/wrn_mixup_model.py:47
Method__init__
(self, nb_layers, in_planes, out_planes, block, stride, dropRate=0.0)
models/wrn_mixup_model.py:73
Method__init__
(self, depth=28, widen_factor=10, num_classes=200, loss_type='dist', per_img_std=False, stride=1,
models/wrn_mixup_model.py:118
Method__init__
(self, block_size)
models/dropblock.py:8
Method__init__
(self, inplanes, planes, stride=1, downsample=None, drop_rate=0.0, drop_block=False, block_size=1)
models/resnet12.py:20
Method__init__
:param distance_metric - Compute the cost matrix. :param ot_reg - Sinkhorn entropy regularization (lambda). For few-shot classificati
bpa/balanced_pairwise_affinities.py:12
Method__iter__
(self)
methods/pt_map/data/dataset.py:92
Method__iter__
(self)
datasets/samplers.py:49
Method__len__
(self)
methods/pt_map/data/dataset.py:30
Method__len__
(self)
methods/pt_map/data/dataset.py:60
Method__len__
(self)
methods/pt_map/data/dataset.py:79
Method__len__
(self)
methods/pt_map/data/dataset.py:89
Method__len__
(self)
datasets/samplers.py:46
Method__len__
(self)
datasets/cifar.py:50
Method__len__
(self)
datasets/cub.py:89
Method__len__
(self)
datasets/mini_imagenet.py:74
Method__str__
(self)
utils.py:331
Method__str__
(self)
utils.py:360
Methodadd_meter
(self, name, meter)
utils.py:368
Methodavg
(self)
utils.py:315
Functionbool_flag
Parse boolean arguments from the command line.
utils.py:239
Functionbool_flag
Parse boolean arguments from the command line.
methods/pt_map/test_standard.py:14
Methodforward
(self, X: torch.Tensor, labels: torch.Tensor, mode: str)
methods/prototypical/proto_loss.py:28
Methodforward
(self, x)
methods/pt_map/save_plk.py:22
Methodforward
(self, X: torch.Tensor, labels: torch.Tensor, mode: str)
methods/pt_map/pt_map_loss.py:132
Methodforward
(self, x)
methods/pt_map/evaluation/save_plk.py:36
Methodforward
(self, x)
models/res_mixup_model.py:47
Methodforward
(self, x)
models/res_mixup_model.py:73
Methodforward
(self, x, target=None, mixup=False, mixup_hidden=True, mixup_alpha=None, lam=0.4)
models/res_mixup_model.py:142
Methodforward
(self, x)
models/wrn_mixup_model.py:34
Methodforward
(self, x)
models/wrn_mixup_model.py:59
Methodforward
(self, x)
models/wrn_mixup_model.py:83
Methodforward
(self, x, target=None, mixup=False, mixup_hidden=True, mixup_alpha=None, lam=0.4, return_logits=True)
models/wrn_mixup_model.py:151
Methodforward
(self, x, gamma)
models/dropblock.py:13
Methodforward
(self, x)
models/resnet12.py:38
Methodforward
(self, x)
models/resnet12.py:112
Methodforward
Compute the BPA feature transform
bpa/balanced_pairwise_affinities.py:83
Functionget_assigned_file
(checkpoint_dir, num)
methods/pt_map/io_utils.py:38
Functionget_best_file
(checkpoint_dir)
methods/pt_map/io_utils.py:55
Functionget_criterion_by_method
Get loss function based on the method.
utils.py:118
Functionget_dataloader
Get dataloader with categorical sampler for few-shot classification.
utils.py:51
Functionget_fs_labels
Prepare few-shot labels. For example for 5-way, 1-shot, 2-query: [0, 1, 2, 3, 4, 0, 1, 2, 3, 4, ...]
utils.py:226
Functionget_method
Get the few-shot classification method (e.g. pt_map).
utils.py:107
Functionget_model
Get the backbone model.
utils.py:37
Functionget_optimizer_and_lr_scheduler
(args, params)
utils.py:75
Functionget_output_dir
Initialize the output dir.
utils.py:155
Functionget_transform
(img_size: int, split_name: str)
datasets/cifar.py:59
Methodglobal_avg
(self)
utils.py:320
Functionidentity
(x)
methods/pt_map/data/dataset.py:10
Functioninit_wandb
Initialize and returns wandb logger if args.wandb is True.
utils.py:131
FunctionloadDataSet
(dsname, root: str = None, features_path: str = None)
methods/pt_map/FSLTask.py:43
Functionload_weights
Load pretrained weights from given path.
utils.py:191
Functionlog_sinkhorn
Log-space-sinkhorn algorithm for better stability.
bpa/ot.py:11
Methodmedian
(self)
utils.py:310
Functionprint_and_log
Print and log current results.
utils.py:253
Functionresnet18
Constructs a ResNet-18 model.
models/res_mixup_model.py:200
Functionset_seed
seed.
utils.py:269
Functionto_one_hot
(inp, num_classes)
models/wrn_mixup_model.py:87
Methodvalue
(self)
utils.py:328
Functionwandb_log
Log step to the logger without print.
utils.py:147
Functionwrn28_10
(num_classes=200, loss_type='dist', dropout=0)
models/wrn_mixup_model.py:206
← previous101–184 of 184, ranked by callers