towhee.models.mdmmt.mmtΒΆ

Functions

get_maxp

pad

Classes

ContextGating

Context Gating Layer :param dimension: dimension :type dimension: int :param add_batch_norm: add batch normalization :type add_batch_norm: bool

GatedEmbeddingUnit

Gated Embedding Unit :param input_dimension: dimension of input :type input_dimension: int :param output_dimension: dimension of output :type output_dimension: int :param use_bn: use batch normalization :type use_bn: bool :param normalize: normalization :type normalize: bool

MMTTXT

MMT TXT Model :param txt_bert: Bert model using for text :type txt_bert: nn.Module :param tokenizer: Tokenizer for input text :type tokenizer: Any :param max_length: text max length :type max_length: int :param modalities: modalities name list :type modalities: List :param add_special_tokens: whether use special tokens :type add_special_tokens: bool :param add_dot: add dot in the end of text :type add_dot: bool :param same_dim: same dim in the dimension of output of GatedEmbeddingUnit :type same_dim: int :param dout_prob: dropout prob :type dout_prob: float

MMTVID

MMT VID model :param expert_dims: dim of each expert model :type expert_dims: Dict :param vid_bert_config: vid bert config :type vid_bert_config: Any :param same_dim: reduce to same dim :type same_dim: int :param hidden_size: hidden size :type hidden_size: int

ReduceDim

ReduceDim Layer