class_docstr: General class for embeddings for any modality.
  
  # Parameters
  
  embeddings : `torch.nn.ModuleDict`
      Named embedding layers. Eg. `"word_embeddings"`, `"position_embeddings"`, etc.
      All the embedding layers are expected to have different inputs; the output
      of one will not be passed to the other. All the layers should have the same
      `embedding_dim`/`out_features`.
  embedding_size : `int`
      The `embedding_dim` of all the embedding layers.
  dropout : `float`
      The probability of an element to be zeroed.
class_docstr_tok: ["General","class","for","embeddings","for","any","modality",".","#","Parameters","embeddings",":","`","torch.nn.ModuleDict","`","Named","embedding","layers",".","Eg",".","`","``","word_embeddings","''","`",",","`","``","position_embeddings","''","`",",","etc",".","All","the","embedding","layers","are","expected","to","have","different","inputs",";","the","output","of","one","will","not","be","passed","to","the","other",".","All","the","layers","should","have","the","same","`","embedding_dim","`","\/","`","out_features","`",".","embedding_size",":","`","int","`","The","`","embedding_dim","`","of","all","the","embedding","layers",".","dropout",":","`","float","`","The","probability","of","an","element","to","be","zeroed","."]
code: def forward(self, *inputs) -> torch.Tensor:
      assert len(inputs) == len(self.embeddings)
      outputs = []
      for i, layer in enumerate(self.embeddings.children()):
          outputs.append(layer(inputs[i]))
  
      outputs = sum(outputs)  # type: ignore
      outputs = self.layer_norm(outputs)
      outputs = self.dropout(outputs)
      return outputs
  
file_path: allennlp/allennlp/modules/transformer/transformer_embeddings.py
imports: from typing import Optional, TYPE_CHECKING
  import torch
  from allennlp.common import FromParams
  from allennlp.modules.transformer.layer_norm import LayerNorm
  from allennlp.modules.transformer.transformer_module import TransformerModule
label_desc: Use image node_id 2 for calling the Embeddings obj's underlying member method code with example usage: obj.forward() and returns: outputs