class_docstr: Wrapper class on top of the TensorFlow native iterators :class:`tf.data.Iterator`.
docstr: Create a data generator wrapper for TensorFlow. Supported iterators: initializable, reinitializable, feedable.
  
  :param sess: TensorFlow session.
  :param iterator: Data iterator from TensorFlow.
  :param iterator_type: Type of the iterator. Supported types: `initializable`, `reinitializable`, `feedable`.
  :param iterator_arg: Argument to initialize the iterator. It is either a feed_dict used for the initializable
  and feedable mode, or an init_op used for the reinitializable mode.
  :param size: Total size of the dataset.
  :param batch_size: Size of the minibatches.
  :raises `TypeError`, `ValueError`: If input parameters are not valid.
code: def __init__(
      self,
      sess: "tf.Session",
      iterator: "tf.data.Iterator",
      iterator_type: str,
      iterator_arg: Union[Dict, Tuple, "tf.Operation"],
      size: int,
      batch_size: int,
  ) -> None:
      """
      Create a data generator wrapper for TensorFlow. Supported iterators: initializable, reinitializable, feedable.
  
      :param sess: TensorFlow session.
      :param iterator: Data iterator from TensorFlow.
      :param iterator_type: Type of the iterator. Supported types: `initializable`, `reinitializable`, `feedable`.
      :param iterator_arg: Argument to initialize the iterator. It is either a feed_dict used for the initializable
      and feedable mode, or an init_op used for the reinitializable mode.
      :param size: Total size of the dataset.
      :param batch_size: Size of the minibatches.
      :raises `TypeError`, `ValueError`: If input parameters are not valid.
      """
      # pylint: disable=E0401
      import tensorflow.compat.v1 as tf
  
      super().__init__(size=size, batch_size=batch_size)
      self.sess = sess
      self._iterator = iterator
      self.iterator_type = iterator_type
      self.iterator_arg = iterator_arg
  
      if not isinstance(iterator, tf.data.Iterator):
          raise TypeError("Only support object tf.data.Iterator")
  
      if iterator_type == "initializable":
          if not isinstance(iterator_arg, dict):
              raise TypeError(
                  f"Need to pass a dictionary for iterator type {iterator_type}"
              )
      elif iterator_type == "reinitializable":
          if not isinstance(iterator_arg, tf.Operation):
              raise TypeError(
                  f"Need to pass a TensorFlow operation for iterator type {iterator_type}"
              )
      elif iterator_type == "feedable":
          if not isinstance(iterator_arg, tuple):
              raise TypeError(
                  f"Need to pass a tuple for iterator type {iterator_type}"
              )
      else:
          raise TypeError(
              f"Iterator type {iterator_type} not supported"
          )
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import abc
  import inspect
  import logging
  from typing import Any, Dict, Generator, Iterator, Optional, Tuple, Union, TYPE_CHECKING
  import numpy
label_desc: Use image node_id 1 to create a new TensorFlowDataGenerator object from inherited base classes: DataGenerator with example: obj = TensorFlowDataGenerator(sess, iterator, iterator_type, iterator_arg, size, batch_size)