Spec-Zone.ru › TensorFlow 2.4

tf.data.experimental.prefetch_to_device

View source on GitHub

A transformation that prefetches dataset values to the given device.

View aliases

Compat aliases for migration

See Migration guide for more details.

tf.compat.v1.data.experimental.prefetch_to_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.
Returns
A Dataset transformation function, which can be passed to tf.data.Dataset.apply.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/python/tf/data/experimental/prefetch_to_device

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API