|View source on GitHub|
Holds a list of enqueue operations for a queue, each to be run in a thread.
Compat aliases for migration
See Migration guide for more details.
tf.compat.v1.train.QueueRunner( queue=None, enqueue_ops=None, close_op=None, cancel_op=None, queue_closed_exception_types=None, queue_runner_def=None, import_scope=None )
Queues are a convenient TensorFlow mechanism to compute tensors asynchronously using multiple threads. For example in the canonical 'Input Reader' setup one set of threads generates filenames in a queue; a second set of threads read records from the files, processes them, and enqueues tensors on a second queue; a third set of threads dequeues these input records to construct batches and runs them through training operations.
There are several delicate issues when running multiple threads that way: closing the queues in sequence as the input is exhausted, correctly catching and reporting exceptions, etc.
QueueRunner, combined with the
Coordinator, helps handle these issues.
||List of enqueue ops to run in threads later.|
||Op to close the queue. Pending enqueue ops are preserved.|
||Op to close the queue and cancel pending enqueue ops.|
||Optional tuple of Exception types that indicate that the queue has been closed when raised during an enqueue operation.|