MCPcopy Create free account

hub / github.com/ThomasWangY/2024-AAAI-HPT / functions

Functions862 in github.com/ThomasWangY/2024-AAAI-HPT

↓ 31 callersMethodmodel_backward_and_update
(self, loss, names=None)
dassl/engine/trainer.py:300
↓ 28 callersFunctionlistdir_nohidden
List non-hidden items in a directory. Args: path (str): directory path. sort (bool): sort the items.
dassl/utils/tools.py:135
↓ 23 callersFunctionbuild_optimizer
A function wrapper for building an optimizer. Args: model (nn.Module or iterable): model. optim_cfg (CfgNode): optimization confi
dassl/optim/optimizer.py:13
↓ 23 callersFunctioninit_pretrained_weights
(model, model_url)
dassl/modeling/backbone/resnet.py:212
↓ 23 callersMethodregister_model
(self, name="model", model=None, optim=None, sched=None)
dassl/engine/trainer.py:86
↓ 22 callersMethodgenerate_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
dassl/data/datasets/base_dataset.py:167
↓ 21 callersFunctionbuild_lr_scheduler
A function wrapper for building a learning rate scheduler. Args: optimizer (Optimizer): an Optimizer. optim_cfg (CfgNode): optimi
dassl/optim/lr_scheduler.py:83
↓ 21 callersFunctioncount_num_param
r"""Count number of parameters in a model. Args: model (nn.Module): network model. params: network model`s params. Examples::
dassl/utils/torchtools.py:242
↓ 21 callersMethodupdate_lr
(self, names=None)
dassl/engine/trainer.py:214
↓ 15 callersFunctioncompute_accuracy
Computes the accuracy over the k top predictions for the specified values of k. Args: output (torch.Tensor): prediction matrix with s
dassl/metrics/accuracy.py:1
↓ 15 callersMethodget
(self, name)
dassl/utils/registry.py:59
↓ 15 callersFunctionmkdir_if_missing
Create dirname if it is missing.
dassl/utils/tools.py:34
↓ 13 callersMethodcheck_input_domains
(self, source_domains, target_domains)
dassl/data/datasets/base_dataset.py:122
↓ 12 callersFunction_resnet
( arch: str, block: Type[Union[BasicBlock, Bottleneck, BasicBlockDynamic,
dassl/modeling/backbone/resnet_dynamic.py:552
↓ 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:143
↓ 10 callersFunctionbuild_transform
Build transformation function. Args: cfg (CfgNode): config. is_train (bool, optional): for training (True) or test (False).
dassl/data/transforms/transforms.py:176
↓ 10 callersMethodget_model_names
(self, names=None)
dassl/engine/trainer.py:108
↓ 10 callersMethodtransport_cost
(self, x, y, return_pi=False)
dassl/modeling/ops/optimal_transport.py:58
↓ 9 callersMethodread_split
(filepath, path_prefix)
datasets/oxford_pets.py:125
↓ 9 callersMethodsave_split
(train, val, test, filepath, path_prefix)
datasets/oxford_pets.py:102
↓ 8 callersMethod__init__
(self, c_in, reduction=4)
trainers/hpt_plus.py:134
↓ 8 callersFunctionbuild_efficientnet
(name, pretrained)
dassl/modeling/backbone/efficientnet/model.py:327
↓ 7 callersMethod__init__
(self, cfg, classnames, clip_model)
trainers/hpt.py:398
↓ 7 callersMethodclose
(self)
dassl/utils/logger.py:54
↓ 7 callersFunctionget_same_padding_conv2d
Chooses static padding if you have specified an image size, and dynamic padding otherwise. Static padding is necessary for ONNX exporting of model
dassl/modeling/backbone/efficientnet/utils.py:121
↓ 7 callersMethodtrain
Generic training loops.
dassl/engine/trainer.py:242
↓ 6 callersMethod__init__
(self, embed_dim: int, # vision image_resolution: int,
clip/model.py:241
↓ 6 callersMethod__init__
(self, embed_dim: int, # vision image_resolution: int,
llms/clip/model_new.py:244
↓ 6 callersMethod__init__
(self, embed_dim: int, # vision image_resolution: int,
llms/clip/model.py:241
↓ 6 callersFunctioncheck_availability
Check if an element is available in a list. Args: requested (str): probe string. available (list): a list of available strings.
dassl/utils/tools.py:165
↓ 6 callersMethodread_data
(dataset_dir, input_domains, split)
dassl/data/datasets/dg/digits_dg.py:60
↓ 6 callersMethodregistered_names
(self)
dassl/utils/registry.py:68
↓ 6 callersMethodremove_self_distance
(distmat)
dassl/modeling/ops/mmd.py:68
↓ 5 callersFunctionconv1x1
1x1 convolution
dassl/modeling/backbone/resnet_dynamic.py:74
↓ 5 callersMethodencode_text
(self, text)
clip/model.py:340
↓ 5 callersFunctionload_checkpoint
r"""Load checkpoint. ``UnicodeDecodeError`` can be well handled, which means python2-saved files can be read from python3. Args:
dassl/utils/torchtools.py:77
↓ 5 callersMethodparse_batch_train
(self, batch_x, batch_u)
dassl/engine/da/se.py:67
↓ 5 callersMethodread_classnames
Return a dictionary containing key-value pairs of <folder name>: <class name>.
datasets/imagenet.py:64
↓ 5 callersFunctionread_image_list
(im_dir, n_max=None, n_repeat=None)
dassl/data/datasets/dg/digit_single.py:16
↓ 5 callersFunctionread_image_list
(im_dir, n_max=None, n_repeat=None)
dassl/data/datasets/da/digit5.py:17
↓ 5 callersFunctionround_filters
Calculate and round number of filters based on depth multiplier.
dassl/modeling/backbone/efficientnet/utils.py:83
↓ 5 callersMethodupdate
(self, input_dict)
dassl/utils/meters.py:62
↓ 5 callersMethodwrite
(self, msg)
dassl/utils/logger.py:43
↓ 5 callersMethodwrite_scalar
(self, tag, scalar_value, global_step=None)
dassl/engine/trainer.py:234
↓ 4 callersMethod__init__
( self, block: Type[Union[BasicBlock, Bottleneck, BasicBlockDynamic,
dassl/modeling/backbone/resnet_dynamic.py:381
↓ 4 callersMethod_make_layer
(self, planes, blocks, stride=1)
clip/model.py:126
↓ 4 callersMethod_make_layer
(self, planes, blocks, stride=1)
llms/clip/model_new.py:129
↓ 4 callersMethod_make_layer
(self, planes, blocks, stride=1)
llms/clip/model.py:126
↓ 4 callersMethod_make_layer
(self, block, planes, num_blocks, stride)
dassl/modeling/backbone/preact_resnet18.py:105
↓ 4 callersMethod_make_layer
( self, block: Type[Union[BasicBlock, Bottleneck]], planes: int, blocks: int,
dassl/modeling/backbone/resnet_dynamic.py:481
↓ 4 callersMethod_make_layer
(self, block, planes, blocks, stride=1)
dassl/modeling/backbone/resnet.py:149
↓ 4 callersMethod_read_data
(self, input_domains, split="train")
dassl/data/datasets/da/domainnet.py:46
↓ 4 callersMethodalign
(self, seq1, seq2)
trainers/hpt.py:380
↓ 4 callersFunctionbuild_data_loader
( cfg, sampler_type="SequentialSampler", data_source=None, batch_size=64, n_domain=0,
dassl/data/data_manager.py:13
↓ 4 callersFunctioncreate_onehot
Create one-hot tensor. We suggest using nn.functional.one_hot. Args: label (torch.Tensor): 1-D tensor. num_classes (int): nu
dassl/modeling/ops/utils.py:28
↓ 4 callersMethoddownload_data
(self, url, dst, from_gdrive=True)
dassl/data/datasets/base_dataset.py:136
↓ 4 callersMethodget_current_lr
(self, names=None)
dassl/engine/trainer.py:492
↓ 4 callersFunctionget_norm_layer
(norm_type="instance")
dassl/modeling/network/ddaig_fcn.py:45
↓ 4 callersFunctioninit_network_weights
(model, init_type="normal", gain=0.02)
dassl/modeling/network/ddaig_fcn.py:12
↓ 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:79
↓ 4 callersMethodtruncate
(self, array)
trainers/hpt.py:376
↓ 4 callersMethodupdate
(self, val, n=1)
dassl/utils/meters.py:31
↓ 3 callersMethod_read_data
(self, input_domains, split)
dassl/data/datasets/dg/pacs.py:48
↓ 3 callersMethod_read_data
(self, input_domains, split)
dassl/data/datasets/dg/vlcs.py:44
↓ 3 callersMethod_read_data
(self, input_domains, split="train")
dassl/data/datasets/dg/digit_single.py:112
↓ 3 callersMethod_read_data
(self, input_domains)
dassl/data/datasets/da/office_home.py:41
↓ 3 callersMethod_read_data
(self, input_domains, split="train")
dassl/data/datasets/da/digit5.py:107
↓ 3 callersMethod_read_data
(self, input_domains, split="train")
dassl/data/datasets/da/mini_domainnet.py:35
↓ 3 callersMethod_read_data
(self, input_domains)
dassl/data/datasets/da/office31.py:41
↓ 3 callersMethod_read_data
(self, input_domains, split="train")
dassl/data/datasets/da/cifarstl.py:51
↓ 3 callersMethod_read_data
(self, dname)
dassl/data/datasets/da/visda17.py:37
↓ 3 callersMethod_read_split_pacs
(self, split_file)
dassl/data/datasets/dg/pacs.py:79
↓ 3 callersMethodbackward
(ctx, grad_output)
dassl/modeling/ops/reverse_grad.py:13
↓ 3 callersFunctionbuild_head
(name, verbose=True, **kwargs)
dassl/modeling/head/build.py:6
↓ 3 callersMethodbuild_model
(self)
trainers/hpt.py:487
↓ 3 callersFunctioncalculate_output_image_size
Calculates the output image size when using Conv2dSamePadding with a stride. Necessary for static padding. Thanks to mannatsingh for pointing
dassl/modeling/backbone/efficientnet/utils.py:140
↓ 3 callersFunctioncheck_isfile
Check if the given path is a file. Args: fpath (str): file path. Returns: bool
dassl/utils/tools.py:44
↓ 3 callersFunctionconv3x3
3x3 convolution with padding
dassl/modeling/backbone/resnet_dynamic.py:36
↓ 3 callersFunctionconv3x3_dynamic
3x3 convolution with padding
dassl/modeling/backbone/resnet_dynamic.py:56
↓ 3 callersMethodencode_image
(self, image)
clip/model.py:337
↓ 3 callersMethodencode_text
(self, text)
llms/clip/model.py:340
↓ 3 callersMethodeuclidean_squared_distance
(x, y)
dassl/modeling/ops/mmd.py:76
↓ 3 callersFunctionload_clip_to_cpu
(cfg)
trainers/hpt.py:18
↓ 3 callersFunctionload_pretrained_weights
r"""Load pretrianed weights to model. Features:: - Incompatible layers (unmatched in name or size) will be ignored. - Can automat
dassl/utils/torchtools.py:267
↓ 3 callersMethodparse_batch_train
(self, batch)
dassl/engine/dg/daeldg.py:145
↓ 3 callersMethodparse_batch_train
(self, batch_x, batch_u)
dassl/engine/ssl/fixmatch.py:96
↓ 3 callersMethodrbf_kernel_mixture
(exponent, sigmas=[1, 5, 10])
dassl/modeling/ops/mmd.py:60
↓ 3 callersMethodread_data
(self, subset)
dassl/data/datasets/dg/wilds/wilds_base.py:75
↓ 3 callersMethodread_data
(self, cname2lab, split_file)
datasets/fgvc_aircraft.py:56
↓ 3 callersMethodset_model_mode
(self, mode="train", names=None)
dassl/engine/trainer.py:203
↓ 2 callersMethod__init__
(self, num_features, n_domain, bn_type)
dassl/modeling/ops/dsbn.py:13
↓ 2 callersMethod__init__
(self, in_planes, planes, stride=1)
dassl/modeling/backbone/preact_resnet18.py:11
↓ 2 callersMethod__init__
(self, in_planes, out_planes, stride, dropRate=0.0)
dassl/modeling/backbone/wide_resnet.py:14
↓ 2 callersMethod__init__
( self, block, layers, ms_class=None, ms_layers=[], ms_p=0.5,
dassl/modeling/backbone/resnet.py:109
↓ 2 callersMethod__init__
(self, )
dassl/modeling/backbone/efficientnet/utils.py:254
↓ 2 callersMethod__init__
( self, input_nc, output_nc, nc=32, n_blocks=3, norm_layer=nn.
dassl/modeling/network/ddaig_fcn.py:166
↓ 2 callersMethod__init__
( self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_
dassl/optim/radam.py:20
↓ 2 callersMethod__init__
( self, optimizer, successor, warmup_epoch, last_epoch=-1, ver
dassl/optim/lr_scheduler.py:12
↓ 2 callersMethod__setstate__
(self, state)
dassl/optim/radam.py:47
next →1–100 of 862, ranked by callers