class_docstr: Mean embedding class.
class_docstr_tok: ["Mean","embedding","class","."]
docstr: Compute average embeddings.
  
  Parameters
  ----------
  emb : torch.Tensor
      The input embedding tensor.
  len_ : torch.Tensor
      The sequence length tensor.
  
  Returns
  -------
  torch.Tensor
      The average embedding tensor.
docstr_tok: ["Compute","average","embeddings",".","Parameters","--","--","--","--","--","emb",":","torch.Tensor","The","input","embedding","tensor",".","len_",":","torch.Tensor","The","sequence","length","tensor",".","Returns","--","--","--","-","torch.Tensor","The","average","embedding","tensor","."]
code: def forward(self, emb, len_):
      """Compute average embeddings.
  
      Parameters
      ----------
      emb : torch.Tensor
          The input embedding tensor.
      len_ : torch.Tensor
          The sequence length tensor.
  
      Returns
      -------
      torch.Tensor
          The average embedding tensor.
      """
      summed = torch.sum(emb, dim=-2)
      len_ = len_.unsqueeze(-1).expand_as(summed).float()
      return summed / len_
  
imports: import torch
  from torch import nn
  from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
  from ...data.data import from_batch
  from ..utils.bert_utils import convert_text_to_bert_features, extract_bert_hidden_states
  from ..utils.generic_utils import dropout_fn
  from ..utils.padding_utils import pad_4d_vals
  from ..utils.vocab_utils import Vocab
label_desc: Use image node_id 2 for calling the MeanEmbedding obj's underlying member method code with example usage: obj.forward(emb, len_) and returns: unknown