class_docstr: Handles input pipeline for PlacementMeshImpl.
class_docstr_tok: ["Handles","input","pipeline","for","PlacementMeshImpl","."]
code: def __init__(
      self,
      placement_mesh_impl,
      ds_creator,
      mtf_input_shapes,
      ds_prefetch_size=tf.data.experimental.AUTOTUNE,
      is_eval_mode=False,
  ):
      self._placement_mesh_impl = placement_mesh_impl
      self._mtf_input_shapes = mtf_input_shapes
  
      batch_size = mtf_input_shapes[0].dims[0].size
      if is_eval_mode:
          ds = (
              ds_creator()
              .batch(batch_size, drop_remainder=False)
              .prefetch(ds_prefetch_size)
          )
      else:
          ds = (
              ds_creator()
              .batch(batch_size, drop_remainder=True)
              .prefetch(ds_prefetch_size)
          )
      self._ds_iterator = ds.make_initializable_iterator()
      self._input_initializers = [self._ds_iterator.initializer]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  import threading
  import time
  import numpy
  from six.moves import range
  from six.moves import zip
  import tensorflow.compat.v1
  from tensorflow.python.framework import ops
  from tensorflow.python.tpu import tpu_feed
label_desc: Use image node_id 1 to create a new PlacementMeshImplInputReader object from inherited base classes: object with example: obj = PlacementMeshImplInputReader(placement_mesh_impl, ds_creator, mtf_input_shapes, ds_prefetch_size, is_eval_mode)