Spec-Zone.ru › TensorFlow

tf.compat.v1.train.add_queue_runner

Adds a QueueRunner to a collection in the graph. (deprecated)

View aliases

Compat aliases for migration

See Migration guide for more details.

tf.compat.v1.train.queue_runner.add_queue_runner

tf.compat.v1.train.add_queue_runner(
    qr, collection=ops.GraphKeys.QUEUE_RUNNERS
)

Migrate to TF2

Caution: This API was designed for TensorFlow v1. Continue reading for details on how to migrate from this API to a native TensorFlow v2 equivalent. See the TensorFlow v1 to TensorFlow v2 migration guide for instructions on how to migrate the rest of your code.

QueueRunners are not compatible with eager execution. Instead, please use tf.data to get data into your model.

Description

Deprecated: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: To construct input pipelines, use the tf.data module.

When building a complex model that uses many queues it is often difficult to gather all the queue runners that need to be run. This convenience function allows you to add a queue runner to a well known collection in the graph.

The companion method start_queue_runners() can be used to start threads for all the collected queue runners.

Args
qr A QueueRunner.
collection A GraphKey specifying the graph collection to add the queue runner to. Defaults to GraphKeys.QUEUE_RUNNERS.

© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/compat/v1/train/add_queue_runner

Spec-Zone.ru

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