class_docstr: Base class for op benchmarks.
docstr: Loads the IMDB dataset and sets up the input data to run the ops on.
docstr_tok: ["Loads","the","IMDB","dataset","and","sets","up","the","input","data","to","run","the","ops","on","."]
code: def load_input_data(self, batch_size):
      """Loads the IMDB dataset and sets up the input data to run the ops on."""
  
      self.batch_size = batch_size
      data = tfds.load(
          "imdb_reviews/plain_text", split=tfds.Split.TRAIN
      ).batch(batch_size)
      # The input data has shape [batch_size, data] and the op is run multiple
      # iterations over the first batch
      self.batch_number = 1
  
      if context.executing_eagerly():
          self.iterator = data.as_numpy_iterator()
          self.input_data = [x["text"] for x in self.iterator][0]
      else:
          self.iterator = dataset_ops.make_initializable_iterator(data)
          self.input_data = self.iterator.get_next()["text"]
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import time
  import tensorflow
  import tensorflow_datasets
  from tensorflow.python.client import session
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.eager import context
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import lookup_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow_text.python import ops
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 3 for calling the OpsBaseBenchmark obj's underlying member method code with example usage: obj.load_input_data(batch_size) without return types