|TensorFlow 1 version||View source on GitHub|
Base class for queue implementations.
Compat aliases for migration
See Migration guide for more details.
tf.queue.QueueBase( dtypes, shapes, names, queue_ref )
A queue is a TensorFlow data structure that stores tensors across multiple steps, and exposes operations that enqueue and dequeue tensors.
Each queue element is a tuple of one or more tensors, where each tuple component has a static dtype, and may have a static shape. The queue implementations support versions of enqueue and dequeue that handle single elements, versions that support enqueuing and dequeuing a batch of elements at once.
||A list of types. The length of dtypes must equal the number of tensors in each element.|
||Constraints on the shapes of tensors in an element: A list of shape tuples or None. This list is the same length as dtypes. If the shape of any tensors in the element are constrained, all must be; shapes can be None if the shapes should not be constrained.|
Optional list of names. If provided, the
||The queue reference, i.e. the output of the queue op.|
||If one of the arguments is invalid.|
||The list of dtypes for each component of a queue element.|
||The name of the underlying queue.|
||The list of names for each component of a queue element.|
||The underlying queue reference.|
||The list of shapes for each component of a queue element.|
close( cancel_pending_enqueues=False, name=None )
Closes this queue.
This operation signals that no more elements will be enqueued in
the given queue. Subsequent
operations will fail. Subsequent
operations will continue to succeed if sufficient elements remain
in the queue. Subsequently dequeue and dequeue_many operations
that would otherwise block waiting for more elements (if close
hadn't been called) will now fail immediately.
True, all pending requests will also
(Optional.) A boolean, defaulting to
||A name for the operation (optional).|
|The operation that closes the queue.|
dequeue( name=None )
Dequeues one element from this queue.
If the queue is empty when this operation executes, it will block until there is an element to dequeue.
At runtime, this operation may raise an error if the queue is
tf.QueueBase.close before or during its execution. If the
queue is closed, the queue is em