dataset = tf.data.Dataset.from_tensor_slices((images,boxes)) function_to_map = lambda x,y: func3(x,y) fast_benchmark(dataset.map(function_to_map).batch(1).prefetch(tf.data.experimental.AUTOTUNE)) Now I here is the func3
def fast_benchmark(dataset, num_epochs=2): start_time = time.perf_counter() print('dataset->',dataset) for _ in tf.data.Dataset.range(num_epochs): for _,__ in dataset: print(_,__) break pass the ooutput of print is
tf.Tensor([b'/media/jake/mark-4tb3/input/datasets/pascal/VOCtrainval_11-May-2012/VOCdevkit/VOC2012/JPEGImages/2008_000008.jpg'], shape=(1,), dtype=string) <tf.RaggedTensor [[[52, 86, 470, 419], [157, 43, 288, 166]]]> what I want to do in func3()
want to change image directory to the real image and run the batch
