class_docstr: A ``TextFieldEmbedder`` is a ``Module`` that takes as input the
  :class:`~allennlp.data.DataArray` produced by a :class:`~allennlp.data.fields.TextField` and
  returns as output an embedded representation of the tokens in that field.
  
  The ``DataArrays`` produced by ``TextFields`` are `dictionaries` with named representations,
  like "words" and "characters".  When you create a ``TextField``, you pass in a dictionary of
  :class:`~allennlp.data.TokenIndexer` objects, telling the field how exactly the tokens in the
  field should be represented.  This class changes the type signature of ``Module.forward``,
  restricting ``TextFieldEmbedders`` to take inputs corresponding to a single ``TextField``,
  which is a dictionary of tensors with the same names as were passed to the ``TextField``.
  
  We also add a method to the basic ``Module`` API: :func:`get_output_dim()`.  You might need
  this if you want to construct a ``Linear`` layer using the output of this embedder, for
  instance.
docstr: Parameters
  ----------
  text_field_input : ``Dict[str, torch.Tensor]``
      A dictionary that was the output of a call to ``TextField.as_tensor``.  Each tensor in
      here is assumed to have a shape roughly similar to ``(batch_size, sequence_length)``
      (perhaps with an extra trailing dimension for the characters in each token).
  num_wrapping_dims : ``int``, optional (default=0)
      If you have a ``ListField[TextField]`` that created the ``text_field_input``, you'll
      end up with tensors of shape ``(batch_size, wrapping_dim1, wrapping_dim2, ...,
      sequence_length)``.  This parameter tells us how many wrapping dimensions there are, so
      that we can correctly ``TimeDistribute`` the embedding of each named representation.
docstr_tok: ["Parameters","--","--","--","--","--","text_field_input",":","``","Dict","[","str",",","torch.Tensor","]","``","A","dictionary","that","was","the","output","of","a","call","to","``","TextField.as_tensor","``",".","Each","tensor","in","here","is","assumed","to","have","a","shape","roughly","similar","to","``","(","batch_size",",","sequence_length",")","``","(","perhaps","with","an","extra","trailing","dimension","for","the","characters","in","each","token",")",".","num_wrapping_dims",":","``","int","``",",","optional","(","default=0",")","If","you","have","a","``","ListField","[","TextField","]","``","that","created","the","``","text_field_input","``",",","you'll","end","up","with","tensors","of","shape","``","(","batch_size",",","wrapping_dim1",",","wrapping_dim2",",","...",",","sequence_length",")","``",".","This","parameter","tells","us","how","many","wrapping","dimensions","there","are",",","so","that","we","can","correctly","``","TimeDistribute","``","the","embedding","of","each","named","representation","."]
code: def forward(
      self,  # pylint: disable=arguments-differ
      text_field_input,
      num_wrapping_dims=0,
  ):
      """
      Parameters
      ----------
      text_field_input : ``Dict[str, torch.Tensor]``
          A dictionary that was the output of a call to ``TextField.as_tensor``.  Each tensor in
          here is assumed to have a shape roughly similar to ``(batch_size, sequence_length)``
          (perhaps with an extra trailing dimension for the characters in each token).
      num_wrapping_dims : ``int``, optional (default=0)
          If you have a ``ListField[TextField]`` that created the ``text_field_input``, you'll
          end up with tensors of shape ``(batch_size, wrapping_dim1, wrapping_dim2, ...,
          sequence_length)``.  This parameter tells us how many wrapping dimensions there are, so
          that we can correctly ``TimeDistribute`` the embedding of each named representation.
      """
      raise NotImplementedError
  
file_path: magnitude/pymagnitude/third_party/allennlp/modules/text_field_embedders/text_field_embedder.py
imports: from __future__ import absolute_import
  import torch
  from allennlp.common import Registrable
label_desc: Use image node_id 1 for calling the TextFieldEmbedder obj's underlying member method code with example usage: obj.forward(text_field_input, num_wrapping_dims) without return types