class_docstr: A ``Field`` is some piece of a data instance that ends up as an tensor in a model (either as an
  input or an output).  Data instances are just collections of fields.
  
  Fields go through up to two steps of processing: (1) tokenized fields are converted into token
  ids, (2) fields containing token ids (or any other numeric data) are padded (if necessary) and
  converted into tensors.  The ``Field`` API has methods around both of these steps, though they
  may not be needed for some concrete ``Field`` classes - if your field doesn't have any strings
  that need indexing, you don't need to implement ``count_vocab_items`` or ``index``.  These
  methods ``pass`` by default.
  
  Once a vocabulary is computed and all fields are indexed, we will determine padding lengths,
  then intelligently batch together instances and pad them into actual tensors.
docstr: So that ``ListField`` can pad the number of fields in a list (e.g., the number of answer
  option ``TextFields``), we need a representation of an empty field of each type.  This
  returns that.  This will only ever be called when we're to the point of calling
  :func:`as_tensor`, so you don't need to worry about ``get_padding_lengths``,
  ``count_vocab_items``, etc., being called on this empty field.
  
  We make this an instance method instead of a static method so that if there is any state
  in the Field, we can copy it over (e.g., the token indexers in ``TextField``).
docstr_tok: ["So","that","``","ListField","``","can","pad","the","number","of","fields","in","a","list","(","e.g.",",","the","number","of","answer","option","``","TextFields","``",")",",","we","need","a","representation","of","an","empty","field","of","each","type",".","This","returns","that",".","This","will","only","ever","be","called","when","we","'re","to","the","point","of","calling",":","func",":","`","as_tensor","`",",","so","you","do","n't","need","to","worry","about","``","get_padding_lengths","``",",","``","count_vocab_items","``",",","etc.",",","being","called","on","this","empty","field",".","We","make","this","an","instance","method","instead","of","a","static","method","so","that","if","there","is","any","state","in","the","Field",",","we","can","copy","it","over","(","e.g.",",","the","token","indexers","in","``","TextField","``",")","."]
code: def empty_field(self):
      """
      So that ``ListField`` can pad the number of fields in a list (e.g., the number of answer
      option ``TextFields``), we need a representation of an empty field of each type.  This
      returns that.  This will only ever be called when we're to the point of calling
      :func:`as_tensor`, so you don't need to worry about ``get_padding_lengths``,
      ``count_vocab_items``, etc., being called on this empty field.
  
      We make this an instance method instead of a static method so that if there is any state
      in the Field, we can copy it over (e.g., the token indexers in ``TextField``).
      """
      raise NotImplementedError
  
file_path: magnitude/pymagnitude/third_party/allennlp/data/fields/field.py
imports: from __future__ import absolute_import
  import torch
  from allennlp.data.vocabulary import Vocabulary
label_desc: Use image node_id 5 for calling the Field obj's underlying member method code with example usage: obj.empty_field() without return types