tf.data.experimental.prefetch_to_device
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 |
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. |