tf.raw_ops.QueueDequeueUpToV2
bookmark_borderbookmark
Stay organized with collections
Save and categorize content based on your preferences.
Dequeues n
tuples of one or more tensors from the given queue.
View aliases
Compat aliases for migration
See
Migration guide for
more details.
tf.compat.v1.raw_ops.QueueDequeueUpToV2
tf.raw_ops.QueueDequeueUpToV2(
handle, n, component_types, timeout_ms=-1, name=None
)
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.
Args |
handle
|
A Tensor of type resource . The handle to a queue.
|
n
|
A Tensor of type int32 . The number of tuples to dequeue.
|
component_types
|
A list of tf.DTypes that has length >= 1 .
The type of each component in a tuple.
|
timeout_ms
|
An optional int . Defaults to -1 .
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.
|
name
|
A name for the operation (optional).
|
Returns |
A list of Tensor objects of type component_types .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[],null,["# tf.raw_ops.QueueDequeueUpToV2\n\n\u003cbr /\u003e\n\nDequeues `n` tuples of one or more tensors from the given queue.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.raw_ops.QueueDequeueUpToV2`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/QueueDequeueUpToV2)\n\n\u003cbr /\u003e\n\n tf.raw_ops.QueueDequeueUpToV2(\n handle, n, component_types, timeout_ms=-1, name=None\n )\n\nThis operation is not supported by all queues. If a queue does not support\nDequeueUpTo, then an Unimplemented error is returned.\n\nIf the queue is closed and there are more than 0 but less than `n`\nelements remaining, then instead of returning an OutOfRange error like\nQueueDequeueMany, less than `n` elements are returned immediately. If\nthe queue is closed and there are 0 elements left in the queue, then\nan OutOfRange error is returned just like in QueueDequeueMany.\nOtherwise the behavior is identical to QueueDequeueMany:\n\nThis operation concatenates queue-element component tensors along the\n0th dimension to make a single component tensor. All of the components\nin the dequeued tuple will have size n in the 0th dimension.\n\nThis operation has `k` outputs, where `k` is the number of components in\nthe tuples stored in the given queue, and output `i` is the ith\ncomponent of the dequeued tuple.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `handle` | A `Tensor` of type `resource`. The handle to a queue. |\n| `n` | A `Tensor` of type `int32`. The number of tuples to dequeue. |\n| `component_types` | A list of `tf.DTypes` that has length `\u003e= 1`. The type of each component in a tuple. |\n| `timeout_ms` | An optional `int`. Defaults to `-1`. 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. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A list of `Tensor` objects of type `component_types`. ||\n\n\u003cbr /\u003e"]]