tf.data.experimental.prefetch_to_device

A transformation that prefetches dataset values to the given device.

Compat aliases for migration

See Migration guide for more details.

tf.compat.v1.data.experimental.prefetch_to_device, `tf.compat.v2.data.experimental.prefetch_to_device`

device A string. The name of a device to which elements will be prefetched.
buffer_size (Optional.) The number of elements to buffer on device. Defaults to an automatically chosen value.

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