class_docstr: A csv data provider.
docstr: See `data.Provider` get_input_fn.
code: def get_input_fn(self, hparams, mode, batch_size):
      """See `data.Provider` get_input_fn."""
      del hparams
  
      def input_fn(params=None):
          del params
          split = (
              "training"
              if mode == tf.estimator.ModeKeys.TRAIN
              else "validation"
          )
  
          dataset = tf.keras.preprocessing.image_dataset_from_directory(
              directory=self._input_dir,
              labels="inferred",
              label_mode="binary",
              class_names=None,
              color_mode="rgb",
              batch_size=batch_size,
              image_size=(self._image_height, self._image_width),
              shuffle=True,
              seed=73,
              validation_split=self._eval_fraction,
              subset=split,
              interpolation="bilinear",
              follow_links=False,
          )
  
          if mode == tf.estimator.ModeKeys.TRAIN:
              dataset = dataset.cache().prefetch(
                  buffer_size=tf.data.experimental.AUTOTUNE
              )
  
          return dataset
  
      return input_fn
  
file_path: model_search/model_search/data/image_data.py
imports: from model_search.data import data
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the Provider obj's underlying member method code with example usage: obj.get_input_fn(hparams, mode, batch_size) and returns: input_fn, dataset