MCPcopy Create free account

hub / github.com/baaivision/Emu / functions

Functions524 in github.com/baaivision/Emu

Method__init__
( self, multimodal_encoder: EmuModel, scheduler: EulerDiscreteScheduler, unet:
Emu2/emu/diffusion.py:33
Method__init__
(self, prob, exclude_first_token=True)
Emu2/emu/eva_vit.py:30
Method__init__
(self, drop_prob=None)
Emu2/emu/eva_vit.py:71
Method__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.SiLU, drop=0., norm
Emu2/emu/eva_vit.py:117
Method__init__
( self, dim, num_heads=8, qkv_bias=False, qk_scale=None, attn_drop=0., proj_drop=0., w
Emu2/emu/eva_vit.py:142
Method__init__
(self, dim, num_heads, mlp_ratio=4., qkv_bias=False, qk_scale=None, drop=0., attn_drop=0., dr
Emu2/emu/eva_vit.py:257
Method__init__
(self, img_size=224, patch_size=16, in_chans=3, embed_dim=768)
Emu2/emu/eva_vit.py:317
Method__init__
(self, img_size=224, patch_size=16, in_chans=3, num_classes=1000, embed_dim=768, depth=12, nu
Emu2/emu/eva_vit.py:341
Method__init__
(self, args)
Emu2/emu/lm.py:32
Method__init__
( self, vision_cfg: CLIPVisionCfg = CLIPVisionCfg(), text_decoder_cfg: TextDecoderCfg
Emu2/emu/emu.py:21
Method__init__
(self)
Emu2/demo/frontend/libs/meta.py:225
Method__init__
(self, model_cls, weight_path, start_card=0, concurrency=1, gpu_num=1, quantize=False, **kwargs)
Emu2/demo/backend/hf_model/backend.py:59
Method__init__
( self, tokenizer, encoder, eva_size=EVA_IMAGE_SIZE, eva_mean=OPENAI_D
Emu2/demo/backend/hf_model/emu/chat.py:36
Method__init__
( self, tokenizer: str, multimodal_encoder: str, scheduler: str, unet:
Emu2/demo/backend/hf_model/emu/diffusion.py:46
Method__init__
( self, model_cls, weight_path, start_card=0, concurrency=1, g
Emu2/demo/backend/pytorch_model/backend.py:57
Method__iter__
Iterate over shards, yield shards of size group_shards size Each shard is a tuple (shard_id, shard)
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/output_sharder.py:37
Method__iter__
Iterate over shards, yield shards of size number_sample_per_shard or less for the last one Each shard is a tuple (shard_id, shard)
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/input_sharder.py:162
Method__iter__
(self)
Emu1/mm_eval/models/trie.py:81
Method__iter__
(self)
Emu1/mm_eval/models/trie.py:144
Method__len__
(self)
Emu1/mm_eval/datasets/okvqa.py:44
Method__len__
(self)
Emu1/mm_eval/datasets/mmvet.py:36
Method__len__
(self)
Emu1/mm_eval/datasets/visdial.py:62
Method__len__
(self)
Emu1/mm_eval/datasets/vqav2.py:49
Method__len__
(self)
Emu1/mm_eval/datasets/coco.py:44
Method__len__
(self)
Emu1/mm_eval/datasets/vizwiz.py:49
Method__len__
(self)
Emu1/mm_eval/models/trie.py:93
Method__len__
(self)
Emu1/mm_eval/models/trie.py:148
Method__len__
(self)
Emu2/demo/frontend/libs/meta.py:310
Method__str__
(self)
Emu2/demo/frontend/libs/meta.py:125
Method_init_weights
Initialize the weights
Emu1/models/modeling_t5.py:932
Method_init_weights
(self, m)
Emu1/models/eva_vit_model.py:601
Method_pool
(x)
Emu1/models/eva_vit_model.py:680
Method_prune_heads
Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer} See base class PreTrainedModel
Emu1/models/modeling_t5.py:1601
Method_prune_heads
Prunes heads of the model. heads_to_prune: dict of {layer_num: list of heads to prune in this layer} See base class PreTrainedModel
Emu1/models/modeling_t5.py:2095
Method_reorder_cache
(self, past, beam_idx)
Emu1/models/modeling_t5.py:2010
Method_set_gradient_checkpointing
(self, module, value=False)
Emu1/models/modeling_t5.py:994
Method_traverse
(prefix_sequence, trie_dict)
Emu1/mm_eval/models/trie.py:82
Functionclear_history
(meta)
Emu2/demo/frontend/libs/chat_frontend.py:62
Functionclear_history
(meta)
Emu2/demo/frontend/libs/generation_frontend.py:66
Methodclose
(self)
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/data_writer.py:48
Methodclose
(self)
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/data_writer.py:87
Methodclose
(self)
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/data_writer.py:128
Methodclose
(self)
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/data_writer.py:192
Methodclose
(self)
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/data_writer.py:303
Functioncoco_dataloader
(root_path, batch_size)
Emu1/mm_eval/datasets/coco.py:60
Functioncoco_results_processor
(results, output_dir)
Emu1/mm_eval/datasets/coco.py:95
Methodcreate_custom_forward
(module)
Emu1/models/modeling_t5.py:1276
Methodcustom_forward
(*inputs)
Emu1/models/modeling_t5.py:1277
Methoddata_generator
()
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/workers/download_worker.py:147
Methoddecode
( self, *args, pre=None, post=None, only=None, partial=False, passthrough_keys=None, handler=wds.rerai
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/dataloader/custom_wds.py:91
Methoddeparallelize
(self)
Emu1/models/modeling_t5.py:1578
Methoddeparallelize
(self)
Emu1/models/modeling_t5.py:1784
Methoddeparallelize
(self)
Emu1/models/modeling_t5.py:2078
Functiondict_collation_fn
Take a list of samples (as dictionary) and create a batch, preserving the keys. If `tensors` is True, `ndarray` objects are combined into ten
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/dataloader/custom_wds.py:13
Methoddo_log
( self, count, success, failed_to_download, failed_to_subsample, bytes_downloaded, start_time, end_tim
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/logger.py:118
Methoddo_log
(self, status_dict, count)
Emu1/data/yt-sb-1b/video2dataset-1.1.0/video2dataset/logger.py:164
Functiondownload
(video_ids, i)
Emu1/data/yt-sb-1b/get_transcript.py:18
Methoddummy_inputs
(self)
Emu1/models/modeling_t5.py:922
Methodextra_repr
(self)
Emu1/models/eva_vit_model.py:137
Methodextra_repr
(self)
Emu2/emu/eva_vit.py:78
Functionextract_frames
(video, num_frames)
Emu2/demo/backend/hf_model/utils.py:25
Functionextract_frames
(video, num_frames)
Emu2/demo/backend/pytorch_model/utils.py:25
Functionextract_frames
(video, num_frames)
Emu2/demo/common/utils.py:25
Methodforward
(self, t, start_index = 0)
Emu1/models/rope.py:70
Methodforward
(self, t, patch_indices_keep=None)
Emu1/models/rope.py:122
Methodforward
* `x` is the Tensor at the head of a key or a query with shape `[seq_len, batch_size, n_heads, d]`
Emu1/models/rope.py:211
Methodforward
(self, image, text_input, input_mask, text_output=None, output_mask=None, image_latent=None, i
Emu1/models/modeling_emu.py:86
Methodforward
( self, inputs: List[Union[Image.Image, str]], height: int = 512, width: int =
Emu1/models/pipeline.py:66
Methodforward
:param self: :param inputs_embeds: shape [B, 1 + n_image + n_token, C] :param img_length: length of image tokens, not include
Emu1/models/modeling_llama.py:61
Methodforward
Process: 1. image_embeds & text_tokens as input 2. prepend [IMG] token to img features or replace <ImagePatches> in <img><Ima
Emu1/models/modeling_llama.py:189
Methodforward
(self, x: torch.Tensor)
Emu1/models/transformer.py:19
Methodforward
(self, x: torch.Tensor)
Emu1/models/transformer.py:28
Methodforward
(self, x)
Emu1/models/transformer.py:46
Methodforward
if k and v is None, self-attn, else cross-attn :param q: :param k: :param v: :param attn_mask: :retur
Emu1/models/transformer.py:176
Methodforward
:param x: [B, n_token, C (context_dim)] as K and V :param attn_mask: 1, 0 :return: queries: [B, n_query, d_query (d_model)]
Emu1/models/transformer.py:284
Methodforward
:param image_embeds: [B, n_query, C], after projected into Language shape :param text_input: :param text_output: :pa
Emu1/models/modeling_t5.py:93
Methodforward
(self, hidden_states)
Emu1/models/modeling_t5.py:318
Methodforward
(self, hidden_states)
Emu1/models/modeling_t5.py:360
Methodforward
(self, hidden_states)
Emu1/models/modeling_t5.py:377
Methodforward
(self, hidden_states)
Emu1/models/modeling_t5.py:398
Methodforward
Self-attention (if key_value_states is None) or attention over source sentence (provided by key_value_states).
Emu1/models/modeling_t5.py:537
Methodforward
( self, hidden_states, attention_mask=None, position_bias=None
Emu1/models/modeling_t5.py:701
Methodforward
( self, hidden_states, key_value_states, attention_mask=None,
Emu1/models/modeling_t5.py:735
Methodforward
( self, hidden_states, attention_mask=None, position_bias=None
Emu1/models/modeling_t5.py:787
Methodforward
( self, input_ids=None, attention_mask=None, encoder_hidden_st
Emu1/models/modeling_t5.py:1100
Methodforward
r""" Returns: Example: ```python >>> from transformers import T5Tokenizer, T5Model >>> tokenizer = T5Tokeni
Emu1/models/modeling_t5.py:1613
Methodforward
r""" labels (`torch.LongTensor` of shape `(batch_size,)`, *optional*): Labels for computing the sequence classification/regression
Emu1/models/modeling_t5.py:1818
Methodforward
r""" Returns: Example: ```python >>> from transformers import T5Tokenizer, T5EncoderModel >>> tokenizer = T
Emu1/models/modeling_t5.py:2107
Methodforward
(self, x)
Emu1/models/eva_vit_model.py:134
Methodforward
(self, x)
Emu1/models/eva_vit_model.py:167
Methodforward
(self, x)
Emu1/models/eva_vit_model.py:195
Methodforward
(self, x, rel_pos_bias=None, attn_mask=None)
Emu1/models/eva_vit_model.py:277
Methodforward
(self, x, rel_pos_bias=None, attn_mask=None)
Emu1/models/eva_vit_model.py:409
Methodforward
(self, x, **kwargs)
Emu1/models/eva_vit_model.py:445
Methodforward
(self)
Emu1/models/eva_vit_model.py:483
Methodforward
:return: forward_features function returns raw features of ViT, forward with return_all_features returns normalized f
Emu1/models/eva_vit_model.py:667
Methodforward
(self, x)
Emu1/models/eva_vit_model.py:734
Methodforward
(self, img_embeds)
Emu1/models/causal_former.py:43
Methodforward
For chat generation, inputs must be List[List[str | Image.Image]] Otherwise, inputs must be List[str | Image.Image]
Emu2/emu/chat.py:42
Methodforward
( self, inputs: List[Image.Image | str] | str | Image.Image, height: int = 1024,
Emu2/emu/diffusion.py:78
← previousnext →301–400 of 524, ranked by callers