MCPcopy Create free account

hub / github.com/LayneH/GreenMIM / functions

Functions148 in github.com/LayneH/GreenMIM

↓ 35 callersFunctionprint
(*args, **kwargs)
util/misc.py:176
↓ 10 callersMethod__init__
(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_scale=None, drop=0., attn_drop=0., dr
modeling/green_twins_models.py:97
↓ 5 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
modeling/green_swin_models.py:21
↓ 5 callersFunctionget_coordinates
(h, w, device='cpu')
modeling/group_window_attention.py:13
↓ 3 callersMethod__init__
(self, mode='train', max_class=1000, num_classes=1000, transform=None, percent=1., shu
util/base_dataset.py:112
↓ 3 callersFunctionis_dist_avail_and_initialized
()
util/misc.py:187
↓ 3 callersMethodload_state_dict
(self, state_dict)
util/misc.py:293
↓ 3 callersMethodprepare
(self, coords, num_tokens)
modeling/group_window_attention.py:275
↓ 3 callersMethodstate_dict
(self)
util/misc.py:290
↓ 3 callersFunctionto_sparse_tensor
(x: torch.Tensor, indexes: torch.Tensor, H: int, W: int)
modeling/sparse_conv_spconv.py:12
↓ 3 callersFunctionto_sparse_tensor
(x: torch.Tensor, indexes: torch.Tensor)
modeling/sparse_conv_me.py:12
↓ 3 callersMethodupdate
(self, **kwargs)
util/misc.py:91
↓ 2 callersMethod_get_attn_mask
(self, group_id)
modeling/group_window_attention.py:203
↓ 2 callersMethod_get_group_id
(self, coords)
modeling/group_window_attention.py:196
↓ 2 callersMethod_get_rel_pos_idx
(self, coords)
modeling/group_window_attention.py:212
↓ 2 callersMethodapply_mask
(self, x, mask, patches_resolution)
modeling/base_green_models.py:19
↓ 2 callersMethodforward
(self, x: torch.Tensor, indexes: torch.Tensor, H: int, W: int)
modeling/sparse_conv_spconv.py:35
↓ 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)
util/pos_embed.py:49
↓ 2 callersFunctionget_world_size
()
util/misc.py:195
↓ 2 callersMethodgroup
(self, x)
modeling/group_window_attention.py:283
↓ 2 callersMethodload_image
(self, filename)
util/base_dataset.py:30
↓ 2 callersMethodmerge
(self, x)
modeling/group_window_attention.py:290
↓ 2 callersFunctionsetup_for_distributed
This function disables printing when not in master process
util/misc.py:170
↓ 2 callersMethodupdate
(self, value, n=1)
util/misc.py:37
↓ 1 callersMethod__init__
(self, window_size, shift_size, group_size=None)
modeling/group_window_attention.py:187
↓ 1 callersMethod__init__
(self, *args, **kwargs)
modeling/sparse_conv_me.py:24
↓ 1 callersMethod__len__
(self)
util/base_dataset.py:121
↓ 1 callersMethod_init_memcached
(self)
util/base_dataset.py:23
↓ 1 callersMethod_prepare_grouping
(self, coords)
modeling/group_window_attention.py:232
↓ 1 callersMethod_prepare_masking
(self, coords)
modeling/group_window_attention.py:220
↓ 1 callersMethodadd_meter
(self, name, meter)
util/misc.py:120
↓ 1 callersFunctionbuild_transform
(is_train, args)
util/datasets.py:34
↓ 1 callersMethodforward
(self, x, H, W)
modeling/green_twins_models.py:110
↓ 1 callersMethodforward
(self, x: torch.Tensor, indexes: torch.Tensor, H: int = None, W: int = None)
modeling/sparse_conv_me.py:27
↓ 1 callersMethodforward_decoder
(self, x, ids_restore)
modeling/base_green_models.py:192
↓ 1 callersMethodforward_encoder
(self, x, mask_ratio)
modeling/base_green_models.py:183
↓ 1 callersMethodforward_features
(self, x, mask)
modeling/base_green_models.py:49
↓ 1 callersMethodforward_loss
imgs: [N, 3, H, W] pred: [N, L, p*p*3] mask: [N, L], 0 is keep, 1 is remove,
modeling/base_green_models.py:214
↓ 1 callersFunctionget_2d_sincos_pos_embed
grid_size: int of the grid height and width return: pos_embed: [grid_size*grid_size, embed_dim] or [1+grid_size*grid_size, embed_dim] (w/
util/pos_embed.py:20
↓ 1 callersFunctionget_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
util/pos_embed.py:38
↓ 1 callersFunctionget_args_parser
()
main_pretrain.py:35
↓ 1 callersFunctionget_grad_norm_
(parameters, norm_type: float = 2.0)
util/misc.py:297
↓ 1 callersFunctionget_keep_index
(samples, percent, num_classes, shuffle=False)
util/base_dataset.py:97
↓ 1 callersFunctionget_layer_id_for_vit
Assign a parameter with its layer id Following BEiT: https://github.com/microsoft/unilm/blob/master/beit/optim_factory.py#L33
util/lr_decay.py:64
↓ 1 callersFunctionget_pretrain_model
(model_str, norm_pix_loss=True)
modeling/model_factory.py:15
↓ 1 callersFunctionget_rank
()
util/misc.py:201
↓ 1 callersFunctiongroup_windows
Greedily apply the DP algorithm to group the elements. Args: group_size (int): maximal size of the group num_ele_win (list[int]):
modeling/group_window_attention.py:157
↓ 1 callersMethodinitialize_weights
(self)
modeling/base_green_models.py:94
↓ 1 callersFunctionis_main_process
()
util/misc.py:207
↓ 1 callersFunctionknapsack
Args: W (int): capacity wt (tuple[int]): the numbers of elements within each window
modeling/group_window_attention.py:111
↓ 1 callersFunctionload_pretrained
(ckpt_path, save_path, model_type='swin')
util/extract_backbone.py:8
↓ 1 callersMethodlog_every
(self, iterable, print_freq, header=None)
util/misc.py:123
↓ 1 callersFunctionmain
(args)
main_pretrain.py:105
↓ 1 callersMethodmax
(self)
util/misc.py:70
↓ 1 callersFunctionparse_host_addr
(s)
util/misc.py:238
↓ 1 callersMethodpatchify
(self, x)
modeling/green_swin_models.py:387
↓ 1 callersMethodpatchify
imgs: (N, 3, H, W) x: (N, L, patch_size**2 *3)
modeling/base_green_models.py:126
↓ 1 callersMethodpatchify
(self, x)
modeling/green_twins_models.py:335
↓ 1 callersMethodrandom_masking
NOTE: Perform PER-BATCH random masking by per-sample shuffling. Per-batch shuffling is done by argsort random noise. x: [N, L
modeling/base_green_models.py:154
↓ 1 callersFunctionremap_pretrained_keys_swin
(checkpoint_model)
util/extract_backbone.py:37
↓ 1 callersFunctionsave_on_master
(*args, **kwargs)
util/misc.py:211
↓ 1 callersMethodsynchronize_between_processes
(self)
util/misc.py:116
↓ 1 callersFunctiontrain_one_epoch
(model: torch.nn.Module, data_loader: Iterable, optimizer: torch.optim.Optimizer,
engine_pretrain.py:22
Method__call__
(self, loss, optimizer, clip_grad=None, parameters=None, create_graph=False, update_grad=True)
util/misc.py:274
Method__getattr__
(self, attr)
util/misc.py:100
Method__getitem__
(self, index)
util/base_dataset.py:124
Method__getitem__
(self, index)
util/base_dataset.py:146
Method__init__
(self, in_channels: int, out_channels: int, kernel_size: int = 1, stride: int = 1, padding: i
modeling/sparse_conv_spconv.py:45
Method__init__
(self, dim, input_resolution, num_heads, window_size=7, shift_size=0, mlp_ratio=4., qkv_bias=
modeling/green_swin_models.py:57
Method__init__
(self, input_resolution, dim, norm_layer=nn.LayerNorm)
modeling/green_swin_models.py:110
Method__init__
(self, dim, input_resolution, depth, num_heads, window_size, mlp_ratio=4., qkv_bias=True, qk_
modeling/green_swin_models.py:174
Method__init__
(self, img_size=224, patch_size=4, in_chans=3, embed_dim=96, norm_layer=None)
modeling/green_swin_models.py:257
Method__init__
(self, img_size=224, patch_size=4, in_chans=3, num_classes=1000, embed_dim=96, depths=[2, 2,
modeling/green_swin_models.py:313
Method__init__
(self, dim, window_size, num_heads, qkv_bias=True, qk_scale=None, attn_drop=0., proj_drop=0.)
modeling/group_window_attention.py:34
Method__init__
(self, encoder, embed_dim, patch_size, in_chans=3, decoder_num_patches=196, decoder_embed_dim
modeling/base_green_models.py:60
Method__init__
(self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0., proj_drop=0., sr_ratio=1, norm_layer=nn.
modeling/green_twins_models.py:52
Method__init__
(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_scale=None, drop=0., attn_drop=0., dr
modeling/green_twins_models.py:118
Method__init__
(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_scale=None, drop=0., attn_drop=0., dr
modeling/green_twins_models.py:128
Method__init__
(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768, norm_layer=nn.LayerNorm)
modeling/green_twins_models.py:151
Method__init__
(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768, norm_layer=nn.LayerNorm)
modeling/green_twins_models.py:179
Method__init__
(self, img_size=224, patch_size=16, in_chans=3, num_classes=1000, embed_dims=[64, 128, 256, 512],
modeling/green_twins_models.py:211
Method__init__
(self, in_chans, embed_dim=768, s=1)
modeling/green_twins_models.py:280
Method__init__
(self, img_size=224, patch_size=4, in_chans=3, num_classes=1000, embed_dims=[64, 128, 256, 512],
modeling/green_twins_models.py:300
Method__init__
(self, img_size=224, patch_size=4, in_chans=3, num_classes=1000, embed_dims=[64, 128, 256], n
modeling/green_twins_models.py:373
Method__init__
(self, img_size=224, patch_size=4, in_chans=3, num_classes=1000, embed_dims=[64, 128, 256], n
modeling/green_twins_models.py:386
Method__init__
(self, *args, **kwargs)
modeling/sparse_conv_me.py:50
Method__init__
(self, window_size=20, fmt=None)
util/misc.py:29
Method__init__
(self, delimiter="\t")
util/misc.py:87
Method__init__
(self)
util/misc.py:271
Method__init__
(self)
util/base_dataset.py:18
Method__init__
(self, mode='train', max_class=1000, aug=None, prefix='/mnt/cache/share/images/meta',
util/base_dataset.py:48
Method__init__
(self, mode='train', max_class=1000, num_classes=1000, transform=None, idx=None, shuff
util/base_dataset.py:132
Method__len__
(self)
util/base_dataset.py:143
Method__str__
(self)
util/misc.py:77
Method__str__
(self)
util/misc.py:108
Method_init_weights
(self, m)
modeling/green_swin_models.py:370
Method_init_weights
(self, m)
modeling/base_green_models.py:116
Method_init_weights
(self, m)
modeling/green_twins_models.py:265
Method_init_weights
(self, m)
modeling/green_twins_models.py:313
Functionadjust_learning_rate
Decay the learning rate with half-cycle cosine after warmup
util/lr_sched.py:9
next →1–100 of 148, ranked by callers