class_docstr: Benchmarks for `tf.data.Dataset.from_tensor_slices()`.
class_docstr_tok: ["Benchmarks","for","`","tf.data.Dataset.from_tensor_slices","(",")","`","."]
code: def benchmark_reshape_slice_repeat(self):
      input_size = 10000
      reshape_dim = [100, 100]
      num_epochs = 100
  
      num_elements = num_epochs * reshape_dim[0]
  
      data = np.random.randn(input_size).reshape(*reshape_dim)
      dataset = dataset_ops.Dataset.from_tensor_slices(data).repeat(
          num_epochs
      )
  
      self.run_and_report_benchmark(
          dataset,
          num_elements=num_elements,
          extras={
              "model_name": "from_tensor_slices.benchmark.2",
              "parameters": "%d" % input_size,
          },
          name="reshape_slice_repeat_input_%d" % input_size,
      )
  
imports: import numpy
  from tensorflow.python.data.benchmarks import benchmark_base
  from tensorflow.python.data.experimental.ops import get_single_element
  from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.data.ops import structured_function
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.ops import gen_dataset_ops
label_desc: Use image node_id 2 for calling the FromTensorSlicesBenchmark obj's underlying member method code with example usage: obj.benchmark_reshape_slice_repeat() without return types