What is tensorflow.python.data.ops.dataset_ops.PrefetchDataset?

Viewed 3481

I ran into some code that gave data in the form of a tensorflow.python.data.ops.dataset_ops.PrefetchDataset. If I am being honest. I don't really understand how this breaks down past data. What does ops, dataset_ops, and PrefetchDataset mean generally, if anything at all

1 Answers

It may be related to tf.raw_ops.PrefetchDataset :
It seems to be an operation that returns an element asynchronously from prefetched dataset.

For instance if the object_x is of type:

<PrefetchDataset shapes: ((), ()), types: (tf.string, tf.int64)>

It is iterable as in;

for string_, int_ in object_x:
    print(string_)

However, PrefetchDataset object doesn't look to be iterator

Related