tf.QueueBase.dequeue_up_to()

tf.QueueBase.dequeue_up_to(n, name=None)

Dequeues and concatenates n elements from this queue.

Note This operation is not supported by all queues. If a queue does not support DequeueUpTo, then a tf.errors.UnimplementedError is raised.

This operation concatenates queue-element component tensors along the 0th dimension to make a single component tensor. If the queue has not been closed, all of the components in the dequeued tuple will have size n in the 0th dimension.

If the queue is closed and there are more than 0 but fewer than n elements remaining, then instead of raising a tf.errors.OutOfRangeError like dequeue_many, less than n elements are returned immediately. If the queue is closed and there are 0 elements left in the queue, then a tf.errors.OutOfRangeError is raised just like in dequeue_many. Otherwise the behavior is identical to dequeue_many.

Args:
  • n: A scalar Tensor containing the number of elements to dequeue.
  • name: A name for the operation (optional).
Returns:

The tuple of concatenated tensors that was dequeued.

doc_TensorFlow
2016-10-14 13:08:46
Comments
Leave a Comment

Please login to continue.