Have a question? Connect with the community at the TensorFlow Forum Visit Forum

QueueDequeueUpTo

public final class QueueDequeueUpTo

Dequeues `n` tuples of one or more tensors from the given queue.

This operation is not supported by all queues. If a queue does not support DequeueUpTo, then an Unimplemented error is returned.

If the queue is closed and there are more than 0 but less than `n` elements remaining, then instead of returning an OutOfRange error like QueueDequeueMany, less than `n` elements are returned immediately. If the queue is closed and there are 0 elements left in the queue, then an OutOfRange error is returned just like in QueueDequeueMany. Otherwise the behavior is identical to QueueDequeueMany:

This operation concatenates queue-element component tensors along the 0th dimension to make a single component tensor. All of the components in the dequeued tuple will have size n in the 0th dimension.

This operation has `k` outputs, where `k` is the number of components in the tuples stored in the given queue, and output `i` is the ith component of the dequeued tuple.

Nested Classes

class QueueDequeueUpTo.Options Optional attributes for QueueDequeueUpTo

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

List< Output <?>>
components ()
One or more tensors that were dequeued as a tuple.
static QueueDequeueUpTo
create ( Scope scope, Operand <?> handle, Operand < TInt32 > n, List<Class<? extends TType >> componentTypes, Options... options)
Factory method to create a class wrapping a new QueueDequeueUpTo operation.
Iterator< Operand < TType >>
static QueueDequeueUpTo.Options
timeoutMs (Long timeoutMs)

Inherited Methods

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "QueueDequeueUpToV2"

Public Methods

public List< Output <?>> components ()

One or more tensors that were dequeued as a tuple.

public static QueueDequeueUpTo create ( Scope scope, Operand <?> handle, Operand < TInt32 > n, List<Class<? extends TType >> componentTypes, Options... options)

Factory method to create a class wrapping a new QueueDequeueUpTo operation.

Parameters
scope current scope
handle The handle to a queue.
n The number of tuples to dequeue.
componentTypes The type of each component in a tuple.
options carries optional attributes values
Returns
  • a new instance of QueueDequeueUpTo

public Iterator< Operand < TType >> iterator ()

public static QueueDequeueUpTo.Options timeoutMs (Long timeoutMs)

Parameters
timeoutMs If the queue has fewer than n elements, this operation will block for up to timeout_ms milliseconds. Note: This option is not supported yet.