MCPcopy Create free account

hub / github.com/alipay/Ant-Multi-Modal-Framework / functions

Functions4,004 in github.com/alipay/Ant-Multi-Modal-Framework

↓ 1 callersMethod_parse_url
(self, url)
antmmf/utils/download.py:94
↓ 1 callersMethod_prep_image_attribution
(self, attributions, instance)
antmmf/modules/interpret/saliency_interpreter.py:179
↓ 1 callersMethod_prep_text_attribution
(self, attributions, instance)
antmmf/modules/interpret/saliency_interpreter.py:146
↓ 1 callersFunction_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_length)`,
prj/M2_omni/models/modeling_m2omni.py:58
↓ 1 callersMethod_prepare_4d_causal_attention_mask_with_cache_position
Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_l
prj/M2_omni/models/modeling_llama_3d.py:1068
↓ 1 callersMethod_prepare_base_model_for_finetune
(self, num_class, dropout=0.0)
antmmf/datasets/features/vision/video_feature.py:145
↓ 1 callersMethod_preprocess_item
Preprocess an item to be returned from __getitem__. Override in your child task class, so you have control on what you are returning
antmmf/tasks/base_task.py:164
↓ 1 callersMethod_preprocess_item
Preprocess an item to be returned from __getitem__. Override in your child task class, so you have control on what you are returning
antmmf/tasks/base_task.py:359
↓ 1 callersFunction_preprocess_text
(text)
prj/M2_Encoder/eval_retrieval.py:10
↓ 1 callersMethod_process_feature_extraction
( self, output, im_scales, im_infos, feature_name="fc6", conf_thresh=0 )
antmmf/scripts/features/extract_features_vmb.py:132
↓ 1 callersMethod_process_rules
(self)
antmmf/models/bert.py:65
↓ 1 callersMethod_random_word_IW_MLM
(self, tokens, probability=0.15)
antmmf/datasets/processors/text_processors.py:729
↓ 1 callersMethod_random_word_raw
(self, tokens, probability=0.15)
antmmf/datasets/processors/text_processors.py:700
↓ 1 callersMethod_register_embedding_gradient_hooks
Registers a backward hook on the embedding layer of the model. Used to save the gradients of the embeddings for use in get_gradients
antmmf/modules/interpret/simple_gradient.py:94
↓ 1 callersMethod_register_hooks
Finds all of the image/text embeddings, and registers a forward hook onto them. When forward() is called, embeddings_list is filled w
antmmf/modules/interpret/simple_gradient.py:79
↓ 1 callersMethod_register_hooks
Register a forward hook on the embedding layer which scales the embeddings by alpha. Used for one term in the Integrated Gradients su
antmmf/modules/interpret/integrated_gradient.py:74
↓ 1 callersMethod_regressive_decode
( self, tgt, memory, memory_key_padding_mask, memory_pos, quer
antmmf/modules/transformers/position_enhance.py:218
↓ 1 callersMethod_relative_position_bucket
(relative_position, bidirectional=True, num_buckets=32, max_distance=128)
prj/M2_Encoder/vlmo/torchscale/component/relative_position_bias.py:20
↓ 1 callersMethod_representations
r""" Extract image & text representations from MMBT. Image representations are the average of image segment in the last layer of MMBT.
antmmf/modules/encoders/multimodal_encoder.py:268
↓ 1 callersMethod_reset_parameters
(self)
antmmf/modules/transformers/position_enhance.py:68
↓ 1 callersMethod_reset_parameters
(self)
antmmf/modules/transformers/base.py:71
↓ 1 callersMethod_reset_parameters
(self)
antmmf/modules/decoders/transformer_decoder_model.py:39
↓ 1 callersMethod_run_init_tpmcl
(self)
prj/dmae_vtp/roi_univl/univl/model/dmae_utils.py:65
↓ 1 callersMethod_run_split_on_punc
Splits punctuation on a piece of text.
antmmf/modules/vision/backbone/clip/cn_tokenizer.py:282
↓ 1 callersMethod_run_strip_accents
Strips accents from a piece of text.
antmmf/modules/vision/backbone/clip/cn_tokenizer.py:271
↓ 1 callersMethod_sample_crop_size
(self, im_size)
antmmf/utils/image_ops.py:345
↓ 1 callersMethod_sample_fix_offset
(self, image_w, image_h, crop_w, crop_h)
antmmf/utils/image_ops.py:377
↓ 1 callersMethod_sample_from_caption_db
(self, index)
prj/snps3_vtp/roi_univl/roi/dataset.py:222
↓ 1 callersMethod_sample_from_caption_db
(self, index)
prj/dmae_vtp/roi_univl/roi/dataset.py:222
↓ 1 callersMethod_sample_from_caption_db
(self, index)
prj/base_vtp/roi_univl/roi/dataset.py:222
↓ 1 callersMethod_sample_from_caption_db
(self, index)
prj/cnvid_vtp/roi_univl/roi/dataset.py:222
↓ 1 callersMethod_sample_from_ocr_db
(self, index)
prj/snps3_vtp/roi_univl/roi/dataset.py:217
↓ 1 callersMethod_sample_from_ocr_db
(self, index)
prj/dmae_vtp/roi_univl/roi/dataset.py:217
↓ 1 callersMethod_sample_from_ocr_db
(self, index)
prj/base_vtp/roi_univl/roi/dataset.py:217
↓ 1 callersMethod_sample_from_ocr_db
(self, index)
prj/cnvid_vtp/roi_univl/roi/dataset.py:217
↓ 1 callersMethod_save
(self, output_dir: Optional[str] = None, state_dict=None)
prj/Pink/pink/train/pink_trainer.py:51
↓ 1 callersMethod_set_registry_for_model
Get values registered in datasets. The dataset builder should save keys of values that is expected to get accessed for model,
antmmf/models/base_model.py:74
↓ 1 callersMethod_space_to_depth
(self, inputs)
antmmf/models/s3dg.py:335
↓ 1 callersMethod_split_text
(self, sentence)
antmmf/models/s3dg.py:219
↓ 1 callersMethod_summarize_meter
Print batch-wise losses/metrics, used in validating a single batch in the training process.
antmmf/trainers/base_trainer.py:852
↓ 1 callersMethod_threaded_read
(self)
antmmf/datasets/database/features_database.py:77
↓ 1 callersMethod_tokenize_chinese_chars
Adds whitespace around any CJK character.
antmmf/modules/vision/backbone/clip/cn_tokenizer.py:302
↓ 1 callersMethod_torch_load
(self, file)
antmmf/common/checkpoint.py:275
↓ 1 callersMethod_truncate_seq_pair
(self, tokens, bboxes, max_length)
antmmf/datasets/processors/text_processors.py:969
↓ 1 callersMethod_truncate_tokens
(self, tokens, max_length, random_truncate=True)
antmmf/datasets/processors/text_processors.py:781
↓ 1 callersMethod_try_download
(self)
antmmf/datasets/processors/text_processors.py:311
↓ 1 callersFunction_unconstrained_adversarial_distance
compute the inner product between the difference of parameter and a base parameter and a gradient to compute Eq. (3) in https://arxi
antmmf/models/mm_adversarial.py:19
↓ 1 callersMethod_update_causal_mask
( self, attention_mask: torch.Tensor, input_tensor: torch.Tensor, cache_positi
prj/M2_omni/models/modeling_llama_3d.py:1002
↓ 1 callersMethod_update_meter
(self, report, meter)
antmmf/trainers/distill_trainer.py:233
↓ 1 callersMethod_update_text_embedding_args
(self, args)
antmmf/models/ant_mmf.py:67
↓ 1 callersMethod_viterbi_decode
( self, emissions: torch.FloatTensor, mask: torch.ByteTensor )
antmmf/modules/layers/crf.py:266
↓ 1 callersMethod_whole_word_masking
(self, tokens, labels)
antmmf/datasets/processors/text_processors.py:821
↓ 1 callersMethod_words_to_token
(self, words)
antmmf/models/s3dg.py:223
↓ 1 callersMethod_zero_pad_tensor_token
(self, tensor, size)
antmmf/models/s3dg.py:209
↓ 1 callersMethodaccumulate
(self)
antmmf/modules/metrics/evaluators/coco_eval.py:67
↓ 1 callersFunctionaccuracy
Computes the precision@k for the specified values of k
antmmf/modules/functional/set_criterion.py:12
↓ 1 callersFunctionadapter
(hidden_dim, scale, dropout, enabled: bool = True, non_linear=False, attn=True, mlp=False)
prj/Pink/pink/model/adapter.py:376
↓ 1 callersMethodadd_caption
(self, sample_info, sample)
prj/dmae_vtp/roi_univl/roi/dataset.py:252
↓ 1 callersMethodadd_caption_for_mc_qa
(self, sample_info, sample)
prj/snps3_vtp/roi_univl/univl/video_text/mc_qa_dataset.py:41
↓ 1 callersMethodadd_caption_for_mc_qa
(self, sample_info, sample)
prj/dmae_vtp/roi_univl/univl/video_text/mc_qa_dataset.py:41
↓ 1 callersMethodadd_caption_for_mc_qa
(self, sample_info, sample)
prj/base_vtp/roi_univl/univl/video_text/mc_qa_dataset.py:41
↓ 1 callersMethodadd_core_args
(self)
antmmf/utils/flags.py:13
↓ 1 callersMethodadd_custom_params
(self, sample_list)
antmmf/models/visual_bert.py:509
↓ 1 callersMethodadd_detr_image_and_objs
( self, sample_info, sample, ocr_box_label=15, topk_detect_objs=15 )
prj/snps3_vtp/roi_univl/univl/pretrain_img_text/dataset.py:55
↓ 1 callersMethodadd_detr_image_and_objs
( self, sample_info, sample, ocr_box_label=15, topk_detect_objs=15 )
prj/dmae_vtp/roi_univl/univl/pretrain_img_text/dataset.py:55
↓ 1 callersMethodadd_detr_image_and_objs
( self, sample_info, sample, ocr_box_label=15, topk_detect_objs=15 )
prj/base_vtp/roi_univl/univl/pretrain_img_text/dataset.py:55
↓ 1 callersMethodadd_generation
(self, sample_info, sample)
prj/snps3_vtp/roi_univl/roi/dataset.py:290
↓ 1 callersMethodadd_generation
(self, sample_info, sample)
prj/dmae_vtp/roi_univl/roi/dataset.py:290
↓ 1 callersMethodadd_generation
(self, sample_info, sample)
prj/base_vtp/roi_univl/roi/dataset.py:290
↓ 1 callersMethodadd_image
(self, sample_info, sample)
prj/snps3_vtp/roi_univl/roi/dataset.py:302
↓ 1 callersMethodadd_image
(self, sample_info, sample)
prj/dmae_vtp/roi_univl/roi/dataset.py:302
↓ 1 callersMethodadd_image
(self, sample_info, sample)
prj/base_vtp/roi_univl/roi/dataset.py:302
↓ 1 callersMethodadd_image
(self, sample_info, sample)
prj/cnvid_vtp/roi_univl/roi/dataset.py:302
↓ 1 callersMethodadd_itm_label
( self, sample_info, sample, current_sample_idx, random_ocr=True,
prj/cnvid_vtp/roi_univl/roi/dataset.py:225
↓ 1 callersMethodadd_label
(self, sample_info, sample)
prj/cnvid_vtp/roi_univl/univl/video_text/ret_dataset.py:120
↓ 1 callersMethodadd_mark_tokens
(self, tokenizer, device, freeze=True)
prj/Pink/pink/model/pink.py:379
↓ 1 callersMethodadd_ocr_bbox
(self, image_info_0, sample_info, ocr_box_label)
prj/snps3_vtp/roi_univl/univl/pretrain_img_text/dataset.py:31
↓ 1 callersMethodadd_ocr_bbox
(self, image_info_0, sample_info, ocr_box_label)
prj/dmae_vtp/roi_univl/univl/pretrain_img_text/dataset.py:31
↓ 1 callersMethodadd_ocr_bbox
(self, image_info_0, sample_info, ocr_box_label)
prj/base_vtp/roi_univl/univl/pretrain_img_text/dataset.py:31
↓ 1 callersMethodadd_ocr_details
(self, sample_info, sample)
prj/cnvid_vtp/roi_univl/roi/dataset.py:317
↓ 1 callersMethodadd_region_info
(self, sample_info, sample)
prj/snps3_vtp/roi_univl/roi/dataset.py:336
↓ 1 callersMethodadd_region_info
(self, sample_info, sample)
prj/dmae_vtp/roi_univl/roi/dataset.py:336
↓ 1 callersMethodadd_region_info
(self, sample_info, sample)
prj/base_vtp/roi_univl/roi/dataset.py:336
↓ 1 callersMethodadd_region_info
(self, sample_info, sample)
prj/cnvid_vtp/roi_univl/roi/dataset.py:336
↓ 1 callersMethodadd_scalar
(self, key, value, iteration)
antmmf/utils/logger.py:127
↓ 1 callersMethodadd_temporal_head
(self)
prj/snps3_vtp/roi_univl/univl/model/univl_video_pretrain.py:67
↓ 1 callersMethodadd_temporal_head
(self)
prj/dmae_vtp/roi_univl/univl/model/univl_video_pretrain.py:67
↓ 1 callersMethodadd_temporal_head
(self)
prj/base_vtp/roi_univl/univl/model/univl_video_pretrain.py:67
↓ 1 callersMethodadd_temporal_head
(self)
prj/cnvid_vtp/roi_univl/univl/model/univl_video_pretrain.py:67
↓ 1 callersMethodadd_text_results
( self, input_canvas, generated_text: str, captions: List[str], text_c
prj/snps3_vtp/roi_univl/univl/model/univl_pretrain.py:202
↓ 1 callersMethodadd_text_results
( self, input_canvas, generated_text: str, captions: List[str], text_c
prj/dmae_vtp/roi_univl/univl/model/univl_pretrain.py:202
↓ 1 callersMethodadd_text_results
( self, input_canvas, generated_text: str, captions: List[str], text_c
prj/base_vtp/roi_univl/univl/model/univl_pretrain.py:202
↓ 1 callersMethodadd_text_results
( self, input_canvas, generated_text: str, captions: List[str], text_c
prj/cnvid_vtp/roi_univl/univl/model/univl_pretrain.py:202
↓ 1 callersMethodadd_video
(self, sample_info, sample, add_default=True)
prj/cnvid_vtp/roi_univl/univl/video_text/ret_dataset.py:89
↓ 1 callersMethodaggregate
r"""Aggregates messages from neighbors as :math:`\square_{j \in \mathcal{N}(i)}`. Takes in the output of message computation as first
antmmf/modules/message_passing/message_passing.py:220
↓ 1 callersFunctionalign_evalai_report_order
(report, annotation)
antmmf/datasets/mm_dataset.py:170
↓ 1 callersMethodalign_evalai_report_order
(self, report)
antmmf/datasets/base_dataset.py:67
↓ 1 callersMethodapply_exif_orientation
(image)
antmmf/utils/image_ops.py:600
↓ 1 callersMethodapply_lfr
(inputs, lfr_m, lfr_n)
prj/M2_omni/models/feature_extraction_sanm.py:368
↓ 1 callersFunctionapply_rotary_pos_emb
(x, sin, cos, scale=1)
prj/M2_Encoder/vlmo/torchscale/component/xpos_relative_position.py:33
← previousnext →901–1,000 of 4,004, ranked by callers