MCPcopy Create free account

hub / github.com/YehLi/xmodaler / functions

Functions909 in github.com/YehLi/xmodaler

Functionget_local_size
Returns: The size of the per-machine process group, i.e. the number of processes per machine.
xmodaler/utils/comm.py:50
Methodget_lr
(self)
xmodaler/lr_scheduler/noam_lr.py:33
Methodget_lr
(self)
xmodaler/lr_scheduler/warmup_lr.py:203
Functioninstantiate
Recursively instantiate objects defined in dictionaries by "_target_" and arguments. Args: cfg: a dict-like object with "_target
xmodaler/config/instantiate.py:36
Functionis_main_process
()
xmodaler/utils/comm.py:63
Methoditer
Returns: int: The current iteration number. When used together with a trainer, this is ensured to be the same as
xmodaler/utils/events.py:438
Methoditeration
(self)
xmodaler/utils/events.py:451
Methodload_data
(self, cfg)
xmodaler/datasets/videos/msvd.py:56
Methodload_data
(self, cfg)
xmodaler/datasets/videos/msrvtt.py:56
Methodload_data
(self, cfg)
xmodaler/datasets/images/mscoco.py:67
Methodload_data
(self, cfg)
xmodaler/datasets/images/mscoco_raw.py:92
Methodload_data
(self, cfg)
xmodaler/datasets/images/mscoco_bert.py:111
Methodload_data
(self, cfg)
xmodaler/datasets/images/mscoco_feat.py:45
Methodload_data
(self, cfg)
xmodaler/datasets/images/flickr30k.py:75
Methodload_data
(self, cfg)
xmodaler/datasets/images/vqa.py:69
Functionload_json
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:24
Functionload_jsonl
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:37
Functionload_pickle
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/step1_mil.py:19
Functionload_pickle
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/step2_txtfeat.py:19
Functionload_pickle
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:14
Methodload_rel
Similar to :meth:`load()`, but load path relative to the caller's source file. This has the same functionality as a relative
xmodaler/config/lazy.py:159
Methodload_state_dict
(self, state_dict)
xmodaler/engine/defaults.py:451
Functionload_xml
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:9
Functionlog_every_n
Log once per n times. Args: lvl (int): the logging level msg (str): n (int): name (str): name of the logger
xmodaler/utils/logger.py:171
Functionlog_every_n_seconds
Log no more than once per n seconds. Args: lvl (int): the logging level msg (str): n (int): name (str): name
xmodaler/utils/logger.py:187
Functionlog_first_n
Log only for the first n times. Args: lvl (int): the logging level msg (str): n (int): name (str): name of t
xmodaler/utils/logger.py:136
Methodlr_lambda
(self, step)
xmodaler/lr_scheduler/warmup_lr.py:34
Methodlr_lambda
(self, step)
xmodaler/lr_scheduler/warmup_lr.py:70
Methodlr_lambda
(self, step)
xmodaler/lr_scheduler/warmup_lr.py:110
Methodlr_lambda
(self, step)
xmodaler/lr_scheduler/warmup_lr.py:149
Methodlr_lambda
(self, step)
xmodaler/lr_scheduler/fix_lr.py:31
Functionmain
(args)
train_net.py:32
Methodmethod
(self)
xmodaler/scorer/cider.py:256
Functionmish
(x)
xmodaler/modeling/layers/create_act.py:50
Functionmkdirp
(p)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:58
Methodname_scope
Yields: A context within which all the events added to this storage will be prefixed by the name scope.
xmodaler/utils/events.py:464
Functionnew_import
(name, globals=None, locals=None, fromlist=(), level=0)
xmodaler/config/lazy.py:124
Methodnoop
(self, *args, **kwargs)
xmodaler/engine/single_stream_retrieval_trainer.py:37
Functionoptimizer_wgc_step
(self, closure=None)
xmodaler/optim/build.py:115
Methodprecompute
(self, key, value2)
xmodaler/modeling/layers/lowrank_bilinear_layers.py:184
Methodprecompute
(self, key, value2)
xmodaler/modeling/layers/lowrank_bilinear_layers.py:219
Methodpreprocess
(self, batched_inputs)
xmodaler/modeling/decoder/attribute_decoder.py:56
Methodpreprocess
(self, batched_inputs)
xmodaler/modeling/decoder/mplstm_decoder.py:42
Methodpreprocess
(self, batched_inputs)
xmodaler/modeling/decoder/updown_decoder.py:71
Methodpreprocess
(self, batched_inputs)
xmodaler/modeling/decoder/salstm_decoder.py:61
Methodpreprocess
(self, batched_inputs)
xmodaler/modeling/decoder/tdconved_decoder.py:105
Methodpreprocess
(self, batched_inputs)
xmodaler/modeling/decoder/lowrank_bilinear_decoder.py:98
Methodpreprocess_batch
(self, batched_inputs)
xmodaler/modeling/meta_arch/base_enc_dec.py:90
Functionprint_csv_format
Print main metrics in a format similar to Detectron, so that they are easy to copypaste into a spreadsheet. Args: results (
xmodaler/evaluation/testing.py:9
Methodput_histogram
Create a histogram from a tensor. Args: hist_name (str): The name of the histogram to put into tensorboard.
xmodaler/utils/events.py:346
Methodput_image
Add an `img_tensor` associated with `img_name`, to be shown on tensorboard. Args: img_name (str): The name of th
xmodaler/utils/events.py:293
Functionrandom_color
Args: rgb (bool): whether to return RGB colors or BGR colors. maximum (int): either 255 or 1 Returns: ndarray: a vec
xmodaler/utils/colormap.py:111
Functionread_lines
(filepath)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:53
Functionreduce_dict
Reduce the values in the dictionary from all processes so that process with rank 0 has the reduced results. Args: input_dict (di
xmodaler/utils/comm.py:234
Functionresize_pos_embed
resize position embedding with class token example: 224:(14x14+1)-> 384: (24x24+1) return: new position embedding
configs/image_caption/cosnet/COS-Net-preprocess/step2_txtfeat.py:31
Methodresume_or_load
(self, resume=True)
xmodaler/engine/defaults.py:297
Functionretry_if_cuda_oom
Makes a function retry itself after encountering pytorch's CUDA OOM error. It will first retry after calling `torch.cuda.empty_cache()`.
xmodaler/utils/memory.py:26
Methodrun_step
(self)
xmodaler/engine/rl_beam_trainer.py:27
Methodrun_step
(self)
xmodaler/engine/vcr_trainer.py:74
Methodrun_step
(self)
xmodaler/engine/rl_mean_trainer.py:29
Methodrun_step
Implement the standard training logic described above.
xmodaler/engine/defaults.py:531
Methodrun_step
Implement the standard training logic described above.
xmodaler/engine/tden_pretrainer.py:26
Methodrun_step
(self)
xmodaler/engine/single_stream_retrieval_trainer.py:145
Methodrun_step
(self)
xmodaler/engine/rl_trainer.py:29
Methodsafe_update
(cfg, key, value)
xmodaler/config/lazy.py:284
Functionsave_id_file
(imgs, output_dir)
tools/msrvtt_preprocess.py:143
Functionsave_id_file
(imgs, output_dir)
tools/msvd_preprocess.py:141
Functionsave_json
(data, filename, save_pretty=False, sort_keys=False)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:29
Functionsave_jsonl
data is a list
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:42
Functionsave_lines
(list_of_str, filepath)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:48
Functionsave_pickle
(data, filename)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:19
Methodsave_vocabulary
Save the tokenizer vocabulary to a directory or file.
xmodaler/tokenization/tokenization_bert.py:206
Methodset
(self, model)
xmodaler/engine/ema.py:29
Functionset_global_cfg
Let the global config point to the given cfg. Assume that the given "cfg" has the key "KEY", after calling `set_global_cfg(cfg)`, the ke
xmodaler/config/config.py:112
Functionsetup_environment
Perform environment setup work. The default setup is a no-op, but this function allows the user to specify a Python source file or a module in
xmodaler/utils/env.py:90
Functionshared_random_seed
Returns: int: a random number that is the same across all workers. If workers need a shared RNG, they can use this shared see
xmodaler/utils/comm.py:220
Methodsim
Compute the cosine similarity of two vectors. :param vec_hyp: array of dictionary for vector corresponding to hypothesis
xmodaler/scorer/cider.py:146
Methodsmoothing_hints
Returns: dict[name -> bool]: the user-provided hint on whether the scalar is noisy and needs smoothing.
xmodaler/utils/events.py:420
Functionsoftmax
(x)
configs/image_caption/cosnet/COS-Net-preprocess/step6_filter.py:14
Methodstate_dict
(self)
xmodaler/engine/defaults.py:443
Methodstate_dict
(self)
xmodaler/engine/train_loop.py:187
Methodstep
User should either: (1) Call this function to increment storage.iter when needed. Or (2) Set `storage.iter` to the correct iteration
xmodaler/utils/events.py:428
Methodstep
(self, closure=None)
xmodaler/optim/radam.py:132
Methodstep
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
xmodaler/optim/bertadam.py:43
Methodstep
Perform the appropriate action at the given iteration. Args: iteration (int): the current iteration, ranged in [0, max_i
xmodaler/checkpoint/xmodaler_checkpoint.py:22
Functionswish
(x)
xmodaler/modeling/layers/create_act.py:30
Functionsynchronize
Helper function to synchronize (barrier) among all processes when using distributed training
xmodaler/utils/comm.py:67
Methodtest
(cls, cfg, model, test_data_loader, evaluator, epoch)
xmodaler/engine/retrieval_trainer.py:27
Methodtest
(cls, cfg, model, test_data_loader, evaluator, epoch)
xmodaler/engine/vcr_trainer.py:46
Methodtest
(cls, cfg, model, test_data_loader, evaluator, epoch)
xmodaler/engine/single_stream_retrieval_trainer.py:47
Methodtest_and_save_results
(epoch)
xmodaler/engine/defaults.py:330
Methodtest_ema_and_save_results
(epoch)
xmodaler/engine/defaults.py:334
Methodtest_forward
(self, u_logits)
xmodaler/modeling/predictor/multimodal_similarity.py:115
Methodto_py
Convert a config object into its equivalent Python code. Args: cfg: an omegaconf config object prefix: root
xmodaler/config/lazy.py:312
Methodtokenize
Tokenizes a piece of text into its word pieces. This uses a greedy longest-match-first algorithm to perform tokenization using the
xmodaler/tokenization/tokenization_bert.py:368
Functiontrivial_batch_collator
(batch)
xmodaler/datasets/build.py:34
Functionunwrap_model
(model)
xmodaler/utils/comm.py:265
Methodupgrade
(cls, cfg: CN)
xmodaler/config/compat.py:154
Methodval_and_save_results
(epoch)
xmodaler/engine/defaults.py:341
Methodval_ema_and_save_results
(epoch)
xmodaler/engine/defaults.py:345
← previousnext →801–900 of 909, ranked by callers