class_docstr: Embedding module for image features.
  
  # Parameters
  
  feature_size : `int`
      Number of image features.
  embedding_size : `int`
      The `embedding_dim` of all the embedding layers.
  dropout : `float` (default = `0.0`)
      The probability of an element to be zeroed.
class_docstr_tok: ["Embedding","module","for","image","features",".","#","Parameters","feature_size",":","`","int","`","Number","of","image","features",".","embedding_size",":","`","int","`","The","`","embedding_dim","`","of","all","the","embedding","layers",".","dropout",":","`","float","`","(","default","=","`","0.0","`",")","The","probability","of","an","element","to","be","zeroed","."]
code: def __init__(
      self, feature_size: int, embedding_size: int, dropout: float = 0.0
  ):
      image_embeddings = torch.nn.Linear(feature_size, embedding_size)
      location_embeddings = torch.nn.Linear(
          4, embedding_size, bias=False
      )
      embeddings = torch.nn.ModuleDict(
          {
              "image_embeddings": image_embeddings,
              "location_embeddings": location_embeddings,
          }
      )
      super().__init__(embeddings, embedding_size, dropout)
  
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 1 to create a new ImageFeatureEmbeddings object from inherited base classes: Embeddings with example: obj = ImageFeatureEmbeddings(feature_size, embedding_size, dropout)