MCPcopy Create free account

hub / github.com/YehLi/xmodaler / functions

Functions909 in github.com/YehLi/xmodaler

↓ 199 callersMethodupdate
(self, model)
xmodaler/engine/ema.py:26
↓ 97 callersMethodsize
(self)
xmodaler/scorer/cider.py:90
↓ 42 callersMethodload
Load a config file. Args: filename: absolute path or relative path w.r.t. the current working directory keys
xmodaler/config/lazy.py:175
↓ 22 callersMethoddump
Returns: str: a yaml string representation of the config
xmodaler/config/config.py:88
↓ 20 callersFunctionpad_tensor
(tensor, padding_value, use_mask)
xmodaler/functional/func_feats.py:11
↓ 19 callersFunctiondict_as_tensor
(input_dict)
xmodaler/functional/func_feats.py:33
↓ 15 callersMethodwrite
(self)
xmodaler/utils/events.py:104
↓ 13 callersMethodeval
(self, results_list, epoch)
xmodaler/evaluation/vcr_evaler.py:20
↓ 11 callersMethod__init__
( self, *, bert_attention, bert_intermediate, bert_output
xmodaler/modeling/layers/bert.py:336
↓ 11 callersMethodpreprocess_batch
(self, batched_inputs)
xmodaler/modeling/meta_arch/ensemble.py:31
↓ 11 callersMethodstep
(self, closure=None)
xmodaler/optim/radam.py:38
↓ 10 callersFunctionget_act_layer
(name='none')
xmodaler/modeling/layers/create_act.py:23
↓ 9 callersFunctionread_np
(path)
xmodaler/functional/func_io.py:21
↓ 8 callersFunction_rename
(cfg: CN, old: str, new: str)
xmodaler/config/compat.py:116
↓ 8 callersMethod_write_metrics
Args: loss_dict (dict): dict of scalar losses data_time (float): time taken by the dataloader iteration
xmodaler/engine/defaults.py:458
↓ 8 callersFunctionexpand_tensor
(tensor, size, dim=1)
xmodaler/functional/func_feats.py:57
↓ 8 callersMethodtrain
Args: start_iter, max_iter (int): See docs above
xmodaler/engine/train_loop.py:135
↓ 7 callersMethodpreprocess
(self, batched_inputs)
xmodaler/modeling/decoder/decoder.py:22
↓ 6 callersMethodadd_special_tokens_single_sentence
Adds special tokens to the a sequence for sequence classification tasks. A BERT sequence has the following format: [CLS] X [SEP]
xmodaler/tokenization/tokenization_bert.py:190
↓ 6 callersFunctionbuild_dataset_mapper
(cfg, name, stage)
xmodaler/datasets/build.py:30
↓ 6 callersFunctionbuild_embeddings
(cfg, name)
xmodaler/modeling/embedding/build.py:13
↓ 6 callersMethodclose
(self)
xmodaler/utils/events.py:126
↓ 6 callersMethodcopy
copy the refs.
xmodaler/scorer/cider.py:57
↓ 5 callersFunctionboxes_to_locfeats
(boxes, image_w, image_h)
xmodaler/functional/func_feats.py:42
↓ 5 callersFunctionflat_list_of_lists
flatten a list of lists [[1,2], [3,4]] to [1,2,3,4]
xmodaler/functional/func_others.py:7
↓ 5 callersFunctionget_world_size
()
xmodaler/utils/comm.py:21
↓ 5 callersMethodinit_states
(self, batch_size)
xmodaler/modeling/decoder/decoder.py:25
↓ 5 callersMethodput_scalar
Add a scalar `value` to the `HistoryBuffer` associated with `name`. Args: smoothing_hint (bool): a 'hint' on whether thi
xmodaler/utils/events.py:308
↓ 5 callersFunctionread_np_bbox
(path, max_feat_num, use_global_v=True)
xmodaler/functional/func_io.py:31
↓ 5 callersMethodtokenize
(self, datalist)
xmodaler/datasets/images/vcr.py:86
↓ 4 callersMethod__init__
( self, *, optimizer, min_lr, warmup_steps, t_total,
xmodaler/lr_scheduler/warmup_lr.py:46
↓ 4 callersFunction_cast_to_config
(obj)
xmodaler/config/lazy.py:75
↓ 4 callersMethodattn
(self, mixed_query_layer, mixed_key_layer, mixed_value_layer, attention_mask)
xmodaler/modeling/layers/cosnet_layer.py:69
↓ 4 callersFunctionbuild_predictor_with_name
(cfg, name)
xmodaler/modeling/predictor/build.py:21
↓ 4 callersFunctionbuild_xmodaler_valtest_loader
(datalist, *, dataset_mapper, batch_size, num_workers, multi_gpu_eval)
xmodaler/datasets/build.py:116
↓ 4 callersFunctionget_event_storage
Returns: The :class:`EventStorage` object that's currently being used. Throws an error if no :class:`EventStorage` is currently e
xmodaler/utils/events.py:25
↓ 4 callersMethodhistory
Returns: HistoryBuffer: the scalar history for name
xmodaler/utils/events.py:378
↓ 4 callersMethodselect_logits_targets_by_mask
(self, tensor, target, mask)
xmodaler/losses/pretrain_losses.py:35
↓ 4 callersMethodstate_dict
Hooks are stateless by default, but can be made checkpointable by implementing `state_dict` and `load_state_dict`.
xmodaler/engine/train_loop.py:83
↓ 4 callersMethodtest
(cls, cfg, model, test_data_loader, evaluator, epoch)
xmodaler/engine/defaults.py:507
↓ 3 callersMethod__init__
( self, *, vocab_size, max_seq_len, token_embed, visual_
xmodaler/modeling/meta_arch/tden.py:164
↓ 3 callersMethod__init__
( self, *, hidden_size: int, att_embed_size: int, att_embed_dropout:
xmodaler/modeling/layers/tdconved_layers.py:291
↓ 3 callersMethod__init__
( self, *, hidden_size: int, intermediate_size: int, layer_norm_eps:
xmodaler/modeling/layers/cosnet_layer.py:168
↓ 3 callersMethod__init__
( self, *, d_model: int, d_k: int, d_v: int, num_head: int
xmodaler/modeling/layers/multihead_attention.py:203
↓ 3 callersMethod__init__
( self, *, hidden_size, vocab_size, transform )
xmodaler/modeling/predictor/bert_predictor.py:20
↓ 3 callersFunction_convert_target_to_string
Inverse of ``locate()``. Args: t: any object with ``__module__`` and ``__qualname__``
xmodaler/utils/registry.py:15
↓ 3 callersFunction_find_caller
Returns: str: module name of the caller tuple: a hashable key to be used to identify different callers
xmodaler/utils/logger.py:115
↓ 3 callersFunctionbuild_encoder
(cfg)
xmodaler/modeling/encoder/build.py:13
↓ 3 callersFunctionbuild_predictor
(cfg)
xmodaler/modeling/predictor/build.py:13
↓ 3 callersFunctionbuild_scorer
(cfg)
xmodaler/scorer/build.py:13
↓ 3 callersFunctionbuild_v_predictor
(cfg)
xmodaler/modeling/predictor/build.py:17
↓ 3 callersFunctionbuild_xmodaler_train_loader
(datalist, *, dataset_mapper, batch_size, num_workers)
xmodaler/datasets/build.py:58
↓ 3 callersMethodclear
(self)
xmodaler/scorer/cider.py:76
↓ 3 callersFunctiondetect_compute_compatibility
(CUDA_HOME, so_file)
xmodaler/utils/collect_env.py:34
↓ 3 callersMethodformat_cap
(self, caption)
xmodaler/datasets/images/flickr30k.py:110
↓ 3 callersMethodfrom_config
(cls, cfg)
xmodaler/modeling/meta_arch/tden.py:194
↓ 3 callersFunctionget_activation
(activation_string)
xmodaler/modeling/layers/create_act.py:62
↓ 3 callersMethodget_extended_attention_mask
(self, batched_inputs)
xmodaler/modeling/meta_arch/ensemble.py:28
↓ 3 callersFunctionget_version
(module, digit=2)
xmodaler/utils/env.py:75
↓ 3 callersMethodload_img_feat
(self, image_id)
xmodaler/datasets/images/flickr30k.py:105
↓ 3 callersMethodprecompute
(self, key, value2)
xmodaler/modeling/layers/lowrank_bilinear_layers.py:127
↓ 3 callersMethodput_scalars
Put multiple scalars from keyword arguments. Examples: storage.put_scalars(loss=my_loss, accuracy=my_accuracy, smoothin
xmodaler/utils/events.py:335
↓ 3 callersMethodretokenize_and_convert_to_ids
(self, _tokens, objects_replace_name)
xmodaler/datasets/images/vcr.py:124
↓ 3 callersFunctionsetup_logger
Initialize the xmodaler logger and set its verbosity level to "DEBUG". Args: output (str): a file name or a directory to save log. I
xmodaler/utils/logger.py:36
↓ 3 callersMethodtokenize
Basic Tokenization of a piece of text. Split on "white spaces" only, for sub-word tokenization, see WordPieceTokenizer. Args:
xmodaler/tokenization/tokenization_bert.py:247
↓ 3 callersMethodtranspose_for_scores
(self, x)
xmodaler/modeling/layers/bert.py:67
↓ 3 callersMethodtranspose_for_scores
(self, x)
xmodaler/modeling/layers/bert.py:264
↓ 3 callersMethodtranspose_for_scores
(self, x)
xmodaler/modeling/layers/cosnet_layer.py:58
↓ 3 callersFunctionwhitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
xmodaler/tokenization/tokenization_bert.py:94
↓ 2 callersMethodForward
(self, logits, targets)
xmodaler/losses/label_smoothing.py:36
↓ 2 callersMethod__init__
( self, *, d_model=512, num_head=8, num_memory=40, d_ff=20
xmodaler/modeling/encoder/memory_augmented_encoder.py:56
↓ 2 callersMethod__init__
( self, *, vocab_size, max_seq_len, token_embed, visual_embed,
xmodaler/modeling/meta_arch/uniter.py:146
↓ 2 callersMethod__init__
( self, *, embed_dim: int, att_heads: int, att_mid_dim: list,
xmodaler/modeling/layers/lowrank_bilinear_layers.py:14
↓ 2 callersFunction_called_with_cfg
Returns: bool: whether the arguments contain CfgNode and should be considered forwarded to from_config.
xmodaler/config/config.py:251
↓ 2 callersMethod_clear_decoding_buffer
(self)
xmodaler/modeling/decoder/tdconved_decoder.py:157
↓ 2 callersFunction_decode
(buffer_, enc_byte)
xmodaler/utils/distributed.py:81
↓ 2 callersMethod_do_eval
(self, epoch)
xmodaler/engine/hooks.py:367
↓ 2 callersFunction_encode
(enc, max_size, use_max_size=False)
xmodaler/utils/distributed.py:64
↓ 2 callersMethod_forward
(self, input_ids, token_type_ids=None, time_step=None)
xmodaler/modeling/embedding/token_embed.py:90
↓ 2 callersFunction_get_args_from_config
Use `from_config` to obtain explicit arguments. Returns: dict: arguments to be used for cls.__init__
xmodaler/config/config.py:218
↓ 2 callersFunction_get_global_gloo_group
Return a process group based on gloo backend, containing all the ranks The result is cached.
xmodaler/utils/comm.py:83
↓ 2 callersFunction_has
(name: str)
xmodaler/config/compat.py:91
↓ 2 callersFunction_ignore_torch_cuda_oom
A context which ignores CUDA OOM exception from pytorch.
xmodaler/utils/memory.py:12
↓ 2 callersFunction_pad_to_largest_tensor
Returns: list[int]: size of the tensor, on each rank Tensor: padded tensor that has the max size
xmodaler/utils/comm.py:112
↓ 2 callersFunction_random_package_name
(filename)
xmodaler/config/lazy.py:88
↓ 2 callersFunction_serialize_to_tensor
(data, group)
xmodaler/utils/comm.py:94
↓ 2 callersMethod_update
(self, model, update_fn)
xmodaler/engine/ema.py:19
↓ 2 callersFunction_validate_py_syntax
(filename)
xmodaler/config/lazy.py:65
↓ 2 callersFunctionassert_eq
(real, expected)
xmodaler/datasets/images/mscoco_bert.py:28
↓ 2 callersFunctionbroadcast_buffer
()
xmodaler/utils/distributed.py:25
↓ 2 callersFunctionbuild_beam_searcher
(cfg)
xmodaler/modeling/decode_strategy/build.py:13
↓ 2 callersFunctionbuild_evaluation
(cfg, annfile, output_dir)
xmodaler/evaluation/build.py:15
↓ 2 callersFunctionbuild_rl_losses
(cfg)
xmodaler/losses/build.py:20
↓ 2 callersFunctioncaption_to_mask_tokens
(caption, max_seq_length, tokenizer, need_g_tokens=False, need_no_mask_tokens=False, must_mask=False)
xmodaler/functional/func_pretrain.py:69
↓ 2 callersFunctionclip_v_inputs
(v_feats, spatials, image_mask)
xmodaler/functional/func_feats.py:113
↓ 2 callersMethodcompute_score
Main function to compute CIDEr score :param hypo_for_image (dict) : dictionary with key <image> and value <tokenized hypothesis /
xmodaler/scorer/cider.py:231
↓ 2 callersFunctionconcat_all_gather
Performs all_gather operation on the provided tensors. *** Warning ***: torch.distributed.all_gather has no gradient.
xmodaler/engine/single_stream_retrieval_trainer.py:20
↓ 2 callersMethodconvert_tokens_to_string
Converts a sequence of tokens (string) in a single string.
xmodaler/tokenization/tokenization_bert.py:185
↓ 2 callersMethodcook_append
called by constructor and __iadd__ to avoid creating new instances.
xmodaler/scorer/cider.py:80
↓ 2 callersFunctiondecode_sequence
(vocab, seq)
xmodaler/functional/func_caption.py:8
next →1–100 of 909, ranked by callers