Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/YehLi/xmodaler
/ functions
Functions
909 in github.com/YehLi/xmodaler
⨍
Functions
909
◇
Types & classes
184
Function
get_local_size
Returns: The size of the per-machine process group, i.e. the number of processes per machine.
xmodaler/utils/comm.py:50
Method
get_lr
(self)
xmodaler/lr_scheduler/noam_lr.py:33
Method
get_lr
(self)
xmodaler/lr_scheduler/warmup_lr.py:203
Function
instantiate
Recursively instantiate objects defined in dictionaries by "_target_" and arguments. Args: cfg: a dict-like object with "_target
xmodaler/config/instantiate.py:36
Function
is_main_process
()
xmodaler/utils/comm.py:63
Method
iter
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
Method
iteration
(self)
xmodaler/utils/events.py:451
Method
load_data
(self, cfg)
xmodaler/datasets/videos/msvd.py:56
Method
load_data
(self, cfg)
xmodaler/datasets/videos/msrvtt.py:56
Method
load_data
(self, cfg)
xmodaler/datasets/images/mscoco.py:67
Method
load_data
(self, cfg)
xmodaler/datasets/images/mscoco_raw.py:92
Method
load_data
(self, cfg)
xmodaler/datasets/images/mscoco_bert.py:111
Method
load_data
(self, cfg)
xmodaler/datasets/images/mscoco_feat.py:45
Method
load_data
(self, cfg)
xmodaler/datasets/images/flickr30k.py:75
Method
load_data
(self, cfg)
xmodaler/datasets/images/vqa.py:69
Function
load_json
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:24
Function
load_jsonl
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:37
Function
load_pickle
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/step1_mil.py:19
Function
load_pickle
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/step2_txtfeat.py:19
Function
load_pickle
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:14
Method
load_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
Method
load_state_dict
(self, state_dict)
xmodaler/engine/defaults.py:451
Function
load_xml
(filename)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:9
Function
log_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
Function
log_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
Function
log_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
Method
lr_lambda
(self, step)
xmodaler/lr_scheduler/warmup_lr.py:34
Method
lr_lambda
(self, step)
xmodaler/lr_scheduler/warmup_lr.py:70
Method
lr_lambda
(self, step)
xmodaler/lr_scheduler/warmup_lr.py:110
Method
lr_lambda
(self, step)
xmodaler/lr_scheduler/warmup_lr.py:149
Method
lr_lambda
(self, step)
xmodaler/lr_scheduler/fix_lr.py:31
Function
main
(args)
train_net.py:32
Method
method
(self)
xmodaler/scorer/cider.py:256
Function
mish
(x)
xmodaler/modeling/layers/create_act.py:50
Function
mkdirp
(p)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:58
Method
name_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
Function
new_import
(name, globals=None, locals=None, fromlist=(), level=0)
xmodaler/config/lazy.py:124
Method
noop
(self, *args, **kwargs)
xmodaler/engine/single_stream_retrieval_trainer.py:37
Function
optimizer_wgc_step
(self, closure=None)
xmodaler/optim/build.py:115
Method
precompute
(self, key, value2)
xmodaler/modeling/layers/lowrank_bilinear_layers.py:184
Method
precompute
(self, key, value2)
xmodaler/modeling/layers/lowrank_bilinear_layers.py:219
Method
preprocess
(self, batched_inputs)
xmodaler/modeling/decoder/attribute_decoder.py:56
Method
preprocess
(self, batched_inputs)
xmodaler/modeling/decoder/mplstm_decoder.py:42
Method
preprocess
(self, batched_inputs)
xmodaler/modeling/decoder/updown_decoder.py:71
Method
preprocess
(self, batched_inputs)
xmodaler/modeling/decoder/salstm_decoder.py:61
Method
preprocess
(self, batched_inputs)
xmodaler/modeling/decoder/tdconved_decoder.py:105
Method
preprocess
(self, batched_inputs)
xmodaler/modeling/decoder/lowrank_bilinear_decoder.py:98
Method
preprocess_batch
(self, batched_inputs)
xmodaler/modeling/meta_arch/base_enc_dec.py:90
Function
print_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
Method
put_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
Method
put_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
Function
random_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
Function
read_lines
(filepath)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:53
Function
reduce_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
Function
resize_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
Method
resume_or_load
(self, resume=True)
xmodaler/engine/defaults.py:297
Function
retry_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
Method
run_step
(self)
xmodaler/engine/rl_beam_trainer.py:27
Method
run_step
(self)
xmodaler/engine/vcr_trainer.py:74
Method
run_step
(self)
xmodaler/engine/rl_mean_trainer.py:29
Method
run_step
Implement the standard training logic described above.
xmodaler/engine/defaults.py:531
Method
run_step
Implement the standard training logic described above.
xmodaler/engine/tden_pretrainer.py:26
Method
run_step
(self)
xmodaler/engine/single_stream_retrieval_trainer.py:145
Method
run_step
(self)
xmodaler/engine/rl_trainer.py:29
Method
safe_update
(cfg, key, value)
xmodaler/config/lazy.py:284
Function
save_id_file
(imgs, output_dir)
tools/msrvtt_preprocess.py:143
Function
save_id_file
(imgs, output_dir)
tools/msvd_preprocess.py:141
Function
save_json
(data, filename, save_pretty=False, sort_keys=False)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:29
Function
save_jsonl
data is a list
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:42
Function
save_lines
(list_of_str, filepath)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:48
Function
save_pickle
(data, filename)
configs/image_caption/cosnet/COS-Net-preprocess/basic_utils.py:19
Method
save_vocabulary
Save the tokenizer vocabulary to a directory or file.
xmodaler/tokenization/tokenization_bert.py:206
Method
set
(self, model)
xmodaler/engine/ema.py:29
Function
set_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
Function
setup_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
Function
shared_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
Method
sim
Compute the cosine similarity of two vectors. :param vec_hyp: array of dictionary for vector corresponding to hypothesis
xmodaler/scorer/cider.py:146
Method
smoothing_hints
Returns: dict[name -> bool]: the user-provided hint on whether the scalar is noisy and needs smoothing.
xmodaler/utils/events.py:420
Function
softmax
(x)
configs/image_caption/cosnet/COS-Net-preprocess/step6_filter.py:14
Method
state_dict
(self)
xmodaler/engine/defaults.py:443
Method
state_dict
(self)
xmodaler/engine/train_loop.py:187
Method
step
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
Method
step
(self, closure=None)
xmodaler/optim/radam.py:132
Method
step
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
xmodaler/optim/bertadam.py:43
Method
step
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
Function
swish
(x)
xmodaler/modeling/layers/create_act.py:30
Function
synchronize
Helper function to synchronize (barrier) among all processes when using distributed training
xmodaler/utils/comm.py:67
Method
test
(cls, cfg, model, test_data_loader, evaluator, epoch)
xmodaler/engine/retrieval_trainer.py:27
Method
test
(cls, cfg, model, test_data_loader, evaluator, epoch)
xmodaler/engine/vcr_trainer.py:46
Method
test
(cls, cfg, model, test_data_loader, evaluator, epoch)
xmodaler/engine/single_stream_retrieval_trainer.py:47
Method
test_and_save_results
(epoch)
xmodaler/engine/defaults.py:330
Method
test_ema_and_save_results
(epoch)
xmodaler/engine/defaults.py:334
Method
test_forward
(self, u_logits)
xmodaler/modeling/predictor/multimodal_similarity.py:115
Method
to_py
Convert a config object into its equivalent Python code. Args: cfg: an omegaconf config object prefix: root
xmodaler/config/lazy.py:312
Method
tokenize
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
Function
trivial_batch_collator
(batch)
xmodaler/datasets/build.py:34
Function
unwrap_model
(model)
xmodaler/utils/comm.py:265
Method
upgrade
(cls, cfg: CN)
xmodaler/config/compat.py:154
Method
val_and_save_results
(epoch)
xmodaler/engine/defaults.py:341
Method
val_ema_and_save_results
(epoch)
xmodaler/engine/defaults.py:345
← previous
next →
801–900 of 909, ranked by callers