tf.data.experimental.prefetch_to_device

View source on GitHub

A transformation that prefetches dataset values to the given device.

tf.data.experimental.prefetch_to_device(
    device, buffer_size=None
)

NOTE: Although the transformation creates a tf.data.Dataset, the transformation must be the final Dataset in the input pipeline.

Args:

Returns:

A Dataset transformation function, which can be passed to tf.data.Dataset.apply.