tf.contrib.data.copy_to_device

tf.contrib.data.copy_to_device(
    target_device,
    source_device='/cpu:0'
)

Defined in tensorflow/contrib/data/python/ops/prefetching_ops.py.

A transformation that copies dataset elements to the given target_device. (deprecated)

THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.data.experimental.copy_to_device(...).

Args:

  • target_device: The name of a device to which elements will be copied.
  • source_device: The original device on which input_dataset will be placed.

Returns:

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