MCPcopy Create free account

hub / github.com/cxh0519/VTB / functions

Functions104 in github.com/cxh0519/VTB

↓ 13 callersFunction_cfg
(url='', **kwargs)
models/vit.py:74
↓ 8 callersMethodappend
(self, **kwargs)
tools/function.py:42
↓ 5 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
models/vit.py:120
↓ 4 callersMethodstate_dict
(self)
solver/scheduler.py:55
↓ 4 callersFunctiontime_str
(fmt=None)
tools/utils.py:12
↓ 4 callersMethodupdate_groups
(self, values)
solver/scheduler.py:81
↓ 3 callersFunctiontrunc_normal_
r"""Fills the input Tensor with values drawn from a truncated normal distribution. The values are effectively drawn from the normal distributi
models/vit.py:358
↓ 3 callersMethodupdate
(self, val, n=1)
tools/utils.py:86
↓ 2 callersMethod_add_noise
(self, lrs, t)
solver/scheduler.py:87
↓ 2 callersMethod_get_lr
(self, t)
solver/cosine_lr.py:67
↓ 2 callersMethodclose
(self)
tools/utils.py:205
↓ 2 callersFunctionnorm_cdf
(x)
models/vit.py:327
↓ 2 callersMethodpreload
(self)
tools/utils.py:422
↓ 2 callersFunctionratio2weight
(targets, ratio)
tools/function.py:11
↓ 2 callersMethodstep
(self, epoch: int, metric: float = None)
solver/scheduler.py:67
↓ 2 callersFunctionto_scalar
preprocess a 1-length pytorch Variable or Tensor to scalar
tools/utils.py:28
↓ 1 callersFunction_no_grad_trunc_normal_
(tensor, mean, std, a, b)
models/vit.py:324
↓ 1 callersFunction_ntuple
(n)
models/vit.py:33
↓ 1 callersFunctionargument_parser
()
config.py:4
↓ 1 callersFunctionbatch_trainer
(epoch, model, train_loader, criterion, optimizer)
batch_engine.py:11
↓ 1 callersFunctioncreate_scheduler
(optimizer, num_epochs, lr=8e-3, warmup_t=10)
solver/scheduler_factory.py:7
↓ 1 callersFunctiondrop_path
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks). This is the same as the DropConnect impl I created for E
models/vit.py:44
↓ 1 callersFunctionfind_index
(seq, item)
tools/utils.py:211
↓ 1 callersFunctiongenerate_data_description
create a dataset description file, which consists of images, labels
dataset/preprocess/rap.py:40
↓ 1 callersFunctiongenerate_data_description
create a dataset description file, which consists of images, labels
dataset/preprocess/pa100k.py:36
↓ 1 callersMethodget_epoch_values
(self, epoch: int)
solver/scheduler.py:61
↓ 1 callersFunctionget_label_embeds
(labels)
dataset/preprocess/rap.py:34
↓ 1 callersFunctionget_label_embeds
(labels)
dataset/preprocess/pa100k.py:30
↓ 1 callersFunctionget_pedestrian_metrics
(gt_label, preds_probs, threshold=0.45)
tools/function.py:70
↓ 1 callersFunctionget_pkl_rootpath
(dataset)
tools/function.py:63
↓ 1 callersFunctionget_transform
(args)
dataset/AttrDataset.py:72
↓ 1 callersMethodget_update_values
(self, num_updates: int)
solver/scheduler.py:64
↓ 1 callersFunctionis_iterable
(obj)
tools/utils.py:24
↓ 1 callersMethodload_param
(self, model_path)
models/vit.py:279
↓ 1 callersMethodload_state_dict
(self, state_dict: Dict[str, Any])
solver/scheduler.py:58
↓ 1 callersFunctionmain
(args)
train.py:23
↓ 1 callersFunctionmake_optimizer
(model, lr=8e-3, weight_decay=1e-4, momentum=0.9)
solver/make_optimizer.py:4
↓ 1 callersFunctionresize_pos_embed
(posemb, posemb_new, hight, width)
models/vit.py:301
↓ 1 callersFunctionsave_ckpt
Note: torch.save() reserves device type and id of tensors to save. So when loading ckpt, you have to inform torch.load() to load
tools/utils.py:320
↓ 1 callersFunctionselect_gpus
(gpus)
tools/utils.py:53
↓ 1 callersFunctionset_seed
(rand_seed)
tools/utils.py:46
↓ 1 callersFunctiontrainer
(epoch, model, train_loader, valid_loader, criterion, optimizer, scheduler, path)
train.py:89
↓ 1 callersFunctiontransfer_optim_state
Transfer an optimizer.state to cpu or specified gpu, which means transferring tensors of the optimizer.state to specified device. The mod
tools/utils.py:244
↓ 1 callersFunctionvalid_trainer
(model, valid_loader, criterion)
batch_engine.py:56
↓ 1 callersFunctionvit_base
(img_size=(256, 128), stride_size=16, drop_rate=0.0, attn_drop_rate=0.0, drop_path_rate=0.1, **kwargs)
models/vit.py:317
Method__del__
(self)
tools/utils.py:171
Method__enter__
(self)
tools/utils.py:174
Method__exit__
(self, **args)
tools/utils.py:177
Method__getitem__
(self, index)
dataset/AttrDataset.py:52
Method__init__
(self)
tools/utils.py:74
Method__init__
(self, hist=0.99)
tools/utils.py:98
Method__init__
(self, hist_size=100)
tools/utils.py:120
Method__init__
(self, fpath=None, console='stdout', immediately_visiable=False)
tools/utils.py:153
Method__init__
(self)
tools/utils.py:397
Method__init__
(self, loader)
tools/utils.py:411
Method__init__
(self, args)
tools/function.py:24
Method__init__
(self, split, args, transform=None, target_transform=None)
dataset/AttrDataset.py:14
Method__init__
(self, optimizer: torch.optim.Optimizer, param_group_field: str,
solver/scheduler.py:25
Method__init__
(self, optimizer: torch.optim.Optimizer, t_initial: int, t_
solver/cosine_lr.py:26
Method__init__
( self, optimizer, milestones, # steps gamma=0.1,
solver/lr_scheduler.py:15
Method__init__
(self, drop_prob=None)
models/vit.py:66
Method__init__
(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0., proj_drop=0.)
models/vit.py:139
Method__init__
(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_scale=None, drop=0., attn_drop=0., dr
models/vit.py:168
Method__init__
(self, img_size=224, patch_size=16, stride_size=20, in_chans=3, embed_dim=768)
models/vit.py:187
Method__init__
(self, img_size=224, patch_size=16, stride_size=16, in_chans=3, num_classes=1000, embed_dim=768, depth=12,
models/vit.py:225
Method__init__
(self, attr_num, dim=768, pretrain_path='checkpoints/jx_vit_base_p16_224-80ecf9dd.pth')
models/base_block.py:8
Method__init__
(self, sample_weight=None, size_average=True, attr_idx=None)
loss/CE_loss.py:12
Method__len__
(self)
dataset/AttrDataset.py:69
Method_get_lr
(self)
solver/lr_scheduler.py:43
Method_init_weights
(self, m)
models/vit.py:258
Functionadjust_lr_staircase
Multiplied by a factor at the beging of specified epochs. Different params groups specify thier own base learning rates. Args: pa
tools/utils.py:337
Methodavg
(self)
tools/utils.py:136
Methodflush
(self)
tools/utils.py:198
Methodforward
(self, x)
models/vit.py:70
Methodforward
(self, x)
models/vit.py:129
Methodforward
(self, x)
models/vit.py:151
Methodforward
(self, x)
models/vit.py:180
Methodforward
(self, x)
models/vit.py:212
Methodforward
(self, x)
models/vit.py:267
Methodforward
(self, imgs, word_vec, label=None)
models/base_block.py:24
Methodforward
(self, logits, targets)
loss/CE_loss.py:19
Methodget_cycle_length
(self, cycles=0)
solver/cosine_lr.py:108
Methodget_epoch_values
(self, epoch: int)
solver/cosine_lr.py:96
Functionget_topk
retain topk elements of a matrix and set others 0 Args: matrix (object): np.array 2d
tools/utils.py:382
Methodget_update_values
(self, num_updates: int)
solver/cosine_lr.py:102
Functionload_ckpt
load state_dict of module & optimizer from file Args: modules_optims: A two-element list which contains module and optimizer
tools/utils.py:302
Functionload_state_dict
copy parameter from src_state_dict to models Arguments: model: A torch.nn.Module object src_state_dict: a dict containing par
tools/utils.py:270
Functionmake_dir
(path)
dataset/preprocess/rap.py:28
Functionmake_dir
(path)
dataset/preprocess/pa100k.py:24
Functionmay_mkdirs
(dir_name)
tools/utils.py:61
Functionmay_set_mode
maybe_modules, an object or a list of objects.
tools/utils.py:367
Methodmeasure
(self, p=1)
tools/utils.py:400
Methodnext
(self)
tools/utils.py:439
Functionparse
(x)
models/vit.py:34
Methodreset
(self)
tools/utils.py:80
Methodreset
(self)
tools/utils.py:103
Methodreset
(self)
tools/utils.py:125
Functionset_devices
Args: sys_device_ids: a tuple; which GPUs to use e.g. sys_device_ids = (), only use cpu sys_device_ids = (3,),
tools/utils.py:218
Methodstep_update
(self, num_updates: int, metric: float = None)
solver/scheduler.py:74
Functionstr2bool
(v)
tools/utils.py:20
next →1–100 of 104, ranked by callers