class_docstr: TFRecord data which loads and processes TFRecord files.
  
  This module can be used to process image data, features, etc.
  
  Args:
      hparams (dict): Hyperparameters. See :meth:`default_hparams`
          for the defaults.
  
  The module reads and restores data from TFRecord files and
  results in a TF Dataset whose element is a Python `dict` that maps feature
  names to feature values. The features names and dtypes are specified in
  :attr:`hparams["dataset"]["feature_original_types"]`.
  
  The module also provides simple processing options for image data, such
  as image resize.
  
  Example:
  
      .. code-block:: python
  
          # Read data from TFRecord file
          hparams={
              'dataset': {
                  'files': 'image1.tfrecord',
                  'feature_original_types': {
                      'height': ['tf.int64', 'FixedLenFeature'],
                      'width': ['tf.int64', 'FixedLenFeature'],
                      'label': ['tf.int64', 'FixedLenFeature'],
                      'image_raw': ['tf.string', 'FixedLenFeature']
                  }
              },
              'batch_size': 1
          }
          data = TFRecordData(hparams)
          iterator = DataIterator(data)
          batch = iterator.get_next()
  
          iterator.switch_to_dataset(sess) # initializes the dataset
          batch_ = sess.run(batch)
          # batch_ == {
          #    'data': {
          #        'height': [239],
          #        'width': [149],
          #        'label': [1],
          #
          #        # 'image_raw' is a list of image data bytes in this
          #        # example.
          #        'image_raw': [...],
          #    }
          # }
  
      .. code-block:: python
  
          # Read image data from TFRecord file and do resizing
          hparams={
              'dataset': {
                  'files': 'image2.tfrecord',
                  'feature_original_types': {
                      'label': ['tf.int64', 'FixedLenFeature'],
                      'image_raw': ['tf.string', 'FixedLenFeature']
                  },
                  'image_options': {
                      'image_feature_name': 'image_raw',
                      'resize_height': 512,
                      'resize_width': 512,
                  }
              },
              'batch_size': 1
          }
          data = TFRecordData(hparams)
          iterator = DataIterator(data)
          batch = iterator.get_next()
  
          iterator.switch_to_dataset(sess) # initializes the dataset
          batch_ = sess.run(batch)
          # batch_ == {
          #    'data': {
          #        'label': [1],
          #
          #        # "image_raw" is a list of a "numpy.ndarray" image
          #        # in this example. Each image has a width of 512 and
          #        # height of 512.
          #        'image_raw': [...]
          #    }
          # }
docstr: Returns the list of item names that the data can produce.
  
  Returns:
      A list of strings.
docstr_tok: ["Returns","the","list","of","item","names","that","the","data","can","produce",".","Returns",":","A","list","of","strings","."]
code: def list_items(self):
      """Returns the list of item names that the data can produce.
  
      Returns:
          A list of strings.
      """
      return sorted(list(self._dataset.output_types.keys()))
  
file_path: texar/texar/tf/data/data/tfrecord_data.py
imports: import tensorflow
  from texar.tf.data.data import dataset_utils
  from texar.tf.data.data.data_base import DataBase
  from texar.tf.data.data.mono_text_data import MonoTextData
  from texar.tf.data.data_decoders import TFRecordDataDecoder
label_desc: Use image node_id 7 for calling the TFRecordData obj's underlying member method code with example usage: obj.list_items() and returns: sorted