MCPcopy Create free account

hub / github.com/CandiceD17/Bottleneck-Transformers-for-Visual-Recognition / functions

Functions42 in github.com/CandiceD17/Bottleneck-Transformers-for-Visual-Recognition

↓ 10 callersMethodupdate
(self, val, n=1)
util/utils.py:155
↓ 4 callersMethod_make_layer
(self, block, planes: int, blocks: int, stride: int = 1, dilate: bool = False)
model/resnet_backbone.py:150
↓ 3 callersFunctionconv1x1
1x1 convolution
model/resnet_backbone.py:19
↓ 2 callersMethoddisplay
(self, batch)
util/utils.py:172
↓ 2 callersFunctionrelative_logits_1d
q: [B, Nh, H, W, d] rel_k: [2W - 1, d] Computes relative logits along one dimension. The details of relative position is explained in
model/rel_pos_embedding.py:35
↓ 1 callersMethod__init__
dim: channels in feature map dim_out: output channels for feature map
model/botnet.py:10
↓ 1 callersMethod__init__
( self, inplanes: int, planes: int, stride: int = 1, downsample: Optio
model/resnet_backbone.py:33
↓ 1 callersMethod__init__
(self, height, width, dim_head)
model/rel_pos_embedding.py:53
↓ 1 callersMethod_forward_impl
(self, x: Tensor)
model/resnet_backbone.py:175
↓ 1 callersMethod_get_batch_fmtstr
(self, num_batches)
util/utils.py:177
↓ 1 callersFunctionconv3x3
3x3 convolution with padding
model/resnet_backbone.py:13
↓ 1 callersFunctionexpand_dim
Expand dims for t at dim to k
model/rel_pos_embedding.py:7
↓ 1 callersFunctionrel_to_abs
x: [B, Nh * H, L, 2L - 1] Convert relative position between the key and query to their absolute position respectively. Tensowflow source
model/rel_pos_embedding.py:17
↓ 1 callersMethodreset
(self)
util/utils.py:149
↓ 1 callersFunctiontrain_epoch
(train_loader, net, criterion, optimizer, scheduler, cur_epoch, rank)
train.py:17
↓ 1 callersFunctiontrain_model
()
train.py:103
↓ 1 callersFunctionvalidate
(val_loader, net, criterion, cur_epoch, rank)
train.py:64
Method__init__
dim: number of channels of feature map fmap_size: [H, W] dim_qk: vector dimension for q, k dim_v: vector dimension fo
model/self_attention_block.py:9
Method__init__
dim: channels in feature map fmap_size: [H, W]
model/botnet.py:70
Method__init__
( self, fmap_size, layers: List[int] = [3, 4, 6, 3], botnet: bool = False,
model/resnet_backbone.py:87
Method__init__
(self, height, width, dim_head)
model/rel_pos_embedding.py:68
Method__init__
(self, name, fmt=":f")
util/utils.py:144
Method__init__
(self, num_batches, meters, prefix="")
util/utils.py:167
Method__str__
(self)
util/utils.py:161
Functionaccuracy
Computes the accuracy over the k top predictions for the specified values of k
util/utils.py:183
Functionconstruct_loader
Constructs the data loader for the given dataset.
util/utils.py:80
Functionconstruct_optimizer
(model)
util/utils.py:130
Methodforward
featuremap: [B, d_in, H, W] Output: [B, H, W, head * d_v]
model/self_attention_block.py:39
Methodforward
(self, featuremap)
model/botnet.py:61
Methodforward
(self, x)
model/botnet.py:117
Methodforward
(self, x: Tensor)
model/resnet_backbone.py:59
Methodforward
(self, x: Tensor)
model/resnet_backbone.py:193
Methodforward
(self, q)
model/rel_pos_embedding.py:60
Methodforward
(self, q)
model/rel_pos_embedding.py:76
Functionget_lr_scheduler
(optimizer)
util/utils.py:200
Functionget_meters
(is_train=True)
util/utils.py:212
Functionload_cfg_fom_args
Load config from command line arguments and set any specified options.
util/config.py:49
Functionreset_cfg
Reset config to initial state.
util/config.py:44
Functionsave_checkpoint
(state, is_best, filename="ckpt.pth.tar")
util/utils.py:221
Functionscaled_all_reduce
Performs the scaled all_reduce operation on the provided tensors. The input tensors are modified in-place. Currently supports only the sum red
util/utils.py:56
Functionsetup_distributed
Initialize distributed training environment. support both slurm and torch.distributed.launch
util/utils.py:19
Functionshow_log
(log_str, rank)
util/utils.py:228