MCPcopy Create free account

hub / github.com/YuqingWang1029/CubiD / functions

Functions90 in github.com/YuqingWang1029/CubiD

↓ 66 callersFunctionprint
(*args, **kwargs)
util/misc.py:172
↓ 9 callersMethodstate_dict
(self)
util/misc.py:269
↓ 6 callersMethodload_state_dict
(self, state_dict)
util/misc.py:272
↓ 4 callersMethod__init__
( self, encoder_name='facebook/dinov2-with-registers-base', encoder_size=224,
rae.py:197
↓ 4 callersMethodencode
Encode with proper resize and normalization
rae.py:260
↓ 3 callersFunctioncreate_rae
Create and initialize fixed RAE model
rae.py:401
↓ 3 callersFunctionevaluate
(model_without_ddp, rae, ema_params, args, epoch, batch_size=16, log_writer=None, cfg=1.0, use_em
engine.py:98
↓ 3 callersMethodforward_decoder
Decode encoder output to predictions.
models/cubid.py:260
↓ 3 callersMethodforward_encoder
Encode masked continuous tokens.
models/cubid.py:230
↓ 3 callersFunctionis_dist_avail_and_initialized
()
util/misc.py:183
↓ 3 callersMethodmax
(self)
util/misc.py:66
↓ 3 callersMethodupdate
(self, **kwargs)
util/misc.py:87
↓ 2 callersFunctioncenter_crop_arr
Center cropping implementation from ADM. https://github.com/openai/guided-diffusion/blob/8fb3ad9197f16bbc40620447b2742e13458d2831/guided_diff
util/crop.py:5
↓ 2 callersMethoddecode
Decode with proper denormalization and clamping
rae.py:288
↓ 2 callersFunctionget_1d_sincos_pos_embed_from_grid
(embed_dim, pos)
rae.py:39
↓ 2 callersFunctionget_world_size
()
util/misc.py:191
↓ 2 callersMethodlog_every
(self, iterable, print_freq, header=None)
util/misc.py:119
↓ 2 callersFunctionsetup_for_distributed
This function disables printing when not in master process
util/misc.py:166
↓ 2 callersMethodupdate
(self, value, n=1)
util/misc.py:33
↓ 1 callersMethod_init_gaussian_quantization
Initialize Gaussian-based quantization bins.
models/cubid.py:121
↓ 1 callersMethod_truncated_normal_mean
Compute mean of truncated normal distribution in [a, b].
models/cubid.py:140
↓ 1 callersMethodadd_meter
(self, name, meter)
util/misc.py:116
↓ 1 callersFunctioncache_latents
Cache RAE latents to disk.
main_cache.py:24
↓ 1 callersFunctioncenter_crop_arr
Center crop matching official implementation
rae.py:430
↓ 1 callersFunctionget_2d_sincos_pos_embed
(embed_dim, grid_size, add_cls_token=False)
rae.py:20
↓ 1 callersFunctionget_2d_sincos_pos_embed_from_grid
(embed_dim, grid)
rae.py:32
↓ 1 callersFunctionget_args_parser
()
main_cubid.py:32
↓ 1 callersFunctionget_args_parser
()
main_cache.py:57
↓ 1 callersFunctionget_grad_norm_
(parameters, norm_type: float = 2.0)
util/misc.py:276
↓ 1 callersFunctionget_rank
()
util/misc.py:197
↓ 1 callersMethodinitialize_weights
(self)
rae.py:134
↓ 1 callersMethodinitialize_weights
Initialize model weights.
models/cubid.py:158
↓ 1 callersFunctionis_main_process
()
util/misc.py:203
↓ 1 callersMethodload_decoder
Load decoder weights
rae.py:315
↓ 1 callersFunctionload_image
Load and preprocess image
rae.py:447
↓ 1 callersMethodload_stats
Load normalization statistics
rae.py:374
↓ 1 callersFunctionmain
(args)
main_cubid.py:169
↓ 1 callersFunctionmain
(args)
main_cache.py:103
↓ 1 callersMethodmask_by_order_3d
Create 3D mask based on order.
models/cubid.py:318
↓ 1 callersMethodnoising
Add noise during training
rae.py:254
↓ 1 callersMethodpatchify
Convert image features to patch sequence.
models/cubid.py:197
↓ 1 callersMethodquantize
Quantize continuous values to discrete indices.
models/cubid.py:180
↓ 1 callersMethodrandom_channel_masking
Apply random per-element masking across spatial and channel dimensions.
models/cubid.py:222
↓ 1 callersMethodsample_mask_ratio
Sample mask ratio from truncated Gaussian.
models/cubid.py:218
↓ 1 callersMethodsample_orders_3d
Generate random ordering for 3D (spatial+channel) sampling.
models/cubid.py:307
↓ 1 callersMethodsample_tokens
Generate tokens via iterative unmasking.
models/cubid.py:327
↓ 1 callersFunctionsave_on_master
(*args, **kwargs)
util/misc.py:207
↓ 1 callersMethodsynchronize_between_processes
(self)
util/misc.py:112
↓ 1 callersFunctiontrain_one_epoch
(model, rae, model_params, ema_params, data_loader: Iterable, optimize
engine.py:31
↓ 1 callersMethodunpatchify
(self, x)
rae.py:143
↓ 1 callersMethodunpatchify
Convert patch sequence back to image features.
models/cubid.py:207
↓ 1 callersFunctionupdate_ema
Update target parameters to be closer to those of source parameters using an exponential moving average.
engine.py:22
Method__call__
(self, loss, optimizer, clip_grad=None, parameters=None, create_graph=False, update_grad=True)
util/misc.py:253
Method__getattr__
(self, attr)
util/misc.py:96
Method__getitem__
Args: index (int): Index Returns: tuple: (sample, target, filename).
util/loader.py:9
Method__getitem__
Args: index (int): Index Returns: tuple: (moments, target).
util/loader.py:40
Method__init__
(self, dim, num_heads=8, qkv_bias=True, attn_drop=0., proj_drop=0.)
rae.py:55
Method__init__
(self, dim, num_heads, mlp_ratio=4., qkv_bias=True, drop=0., attn_drop=0.)
rae.py:81
Method__init__
( self, in_dim=768, decoder_dim=1152, decoder_depth=28, decoder_heads=
rae.py:103
Method__init__
(self, model_name='facebook/dinov2-with-registers-base', normalize=True)
rae.py:170
Method__init__
(self, img_size=256, vae_stride=16, patch_size=1, encoder_embed_dim=1024, encoder_depth=16, e
models/cubid.py:30
Method__init__
( self, root: str, )
util/loader.py:30
Method__init__
(self, window_size=20, fmt=None)
util/misc.py:25
Method__init__
(self, delimiter="\t")
util/misc.py:83
Method__init__
(self)
util/misc.py:250
Method__str__
(self)
util/misc.py:73
Method__str__
(self)
util/misc.py:104
Method_init_weights
Initialize linear and layernorm weights.
models/cubid.py:168
Functionadd_weight_decay
(model, weight_decay=1e-5, skip_list=())
util/misc.py:291
Functionadjust_learning_rate
Decay the learning rate with half-cycle cosine after warmup
util/lr_sched.py:4
Functionall_reduce_mean
(x)
util/misc.py:332
Methodavg
(self)
util/misc.py:57
Functioncubid_base
(**kwargs)
models/cubid.py:427
Functioncubid_huge
(**kwargs)
models/cubid.py:441
Functioncubid_large
(**kwargs)
models/cubid.py:434
Methodforward
(self, x)
rae.py:66
Methodforward
(self, x)
rae.py:92
Methodforward
(self, x)
rae.py:151
Methodforward
(self, x)
rae.py:186
Methodforward
Full forward pass
rae.py:309
Methodforward
Training forward pass with masked prediction loss.
models/cubid.py:284
Methodforward_mae_decoder
(self, x)
models/cubid.py:281
Methodforward_mae_encoder
(self, x, mask, class_embedding)
models/cubid.py:278
Methodglobal_avg
(self)
util/misc.py:62
Functioninit_distributed_mode
(args)
util/misc.py:212
Functionmask_by_order
Create a mask based on the specified order and mask length.
models/cubid.py:19
Methodmedian
(self)
util/misc.py:52
Functionsave_model
(args, epoch, model, model_without_ddp, optimizer, loss_scaler, ema_params=None, epoch_name=None)
util/misc.py:306
Methodsynchronize_between_processes
Warning: does not synchronize the deque!
util/misc.py:38
Methodvalue
(self)
util/misc.py:70