Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::PriorityQueue
#include <data_flow_ops.h>
A queue that produces elements sorted by the first component value.
Summary
Note that the PriorityQueue requires the first component of any element to be a scalar int64, in addition to the other elements declared by component_types. Therefore calls to Enqueue and EnqueueMany (resp. Dequeue and DequeueMany) on a PriorityQueue will all require (resp. output) one extra entry in their input (resp. output) lists.
Args:
- scope: A Scope object
- shapes: The shape of each component in a value. The length of this attr must be either 0 or the same as the length of component_types. If the length of this attr is 0, the shapes of queue elements are not constrained, and only one element may be dequeued at a time.
Optional attributes (see Attrs
):
- component_types: The type of each component in a value.
- capacity: The upper bound on the number of elements in this queue. Negative numbers mean no limit.
- container: If non-empty, this queue is placed in the given container. Otherwise, a default container is used.
- shared_name: If non-empty, this queue will be shared under the given name across multiple sessions.
Returns:
Output
: The handle to the queue.
Public attributes
Public functions
PriorityQueue
PriorityQueue(
const ::tensorflow::Scope & scope,
const gtl::ArraySlice< PartialTensorShape > & shapes
)
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Public static functions
Capacity
Attrs Capacity(
int64 x
)
ComponentTypes
Attrs ComponentTypes(
const DataTypeSlice & x
)
Container
Attrs Container(
StringPiece x
)
SharedName
Attrs SharedName(
StringPiece x
)
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 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[],[],null,["# tensorflow::ops::PriorityQueue Class Reference\n\ntensorflow::ops::PriorityQueue\n==============================\n\n`#include \u003cdata_flow_ops.h\u003e`\n\nA queue that produces elements sorted by the first component value.\n\nSummary\n-------\n\nNote that the [PriorityQueue](/versions/r2.14/api_docs/cc/class/tensorflow/ops/priority-queue#classtensorflow_1_1ops_1_1_priority_queue) requires the first component of any element to be a scalar int64, in addition to the other elements declared by component_types. Therefore calls to Enqueue and EnqueueMany (resp. Dequeue and DequeueMany) on a [PriorityQueue](/versions/r2.14/api_docs/cc/class/tensorflow/ops/priority-queue#classtensorflow_1_1ops_1_1_priority_queue) will all require (resp. output) one extra entry in their input (resp. output) lists.\n\nArgs:\n\n- scope: A [Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- shapes: The shape of each component in a value. The length of this attr must be either 0 or the same as the length of component_types. If the length of this attr is 0, the shapes of queue elements are not constrained, and only one element may be dequeued at a time.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/priority-queue/attrs#structtensorflow_1_1ops_1_1_priority_queue_1_1_attrs)):\n\n- component_types: The type of each component in a value.\n- capacity: The upper bound on the number of elements in this queue. Negative numbers mean no limit.\n- container: If non-empty, this queue is placed in the given container. Otherwise, a default container is used.\n- shared_name: If non-empty, this queue will be shared under the given name across multiple sessions.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The handle to the queue.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [PriorityQueue](#classtensorflow_1_1ops_1_1_priority_queue_1a48d6f04225414471ca632c2c2f7fa61f)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, const gtl::ArraySlice\u003c PartialTensorShape \u003e & shapes)` ||\n| [PriorityQueue](#classtensorflow_1_1ops_1_1_priority_queue_1a077fbbd3ddd4d6bfcc097cd3cc1b6707)`(const ::`[tensorflow::Scope](/versions/r2.14/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, const gtl::ArraySlice\u003c PartialTensorShape \u003e & shapes, const `[PriorityQueue::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/priority-queue/attrs#structtensorflow_1_1ops_1_1_priority_queue_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [handle](#classtensorflow_1_1ops_1_1_priority_queue_1a7c9339da7e19f49ed3ba718fa3abbc03) | `::`[tensorflow::Output](/versions/r2.14/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_priority_queue_1a5117c5ab1c0164f94212f42c9d5e7e2e) | [Operation](/versions/r2.14/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_priority_queue_1a1106c32e99fdb703d51f0ec5bc64bb14)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_priority_queue_1a7370046bb9ab89339a4cf36af96a2587)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_priority_queue_1a208f5da928335dc25e8cf5305a5de879)`() const ` | |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|\n| [Capacity](#classtensorflow_1_1ops_1_1_priority_queue_1a309e1701f67df0908bd467ef311b9a89)`(int64 x)` | [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/priority-queue/attrs#structtensorflow_1_1ops_1_1_priority_queue_1_1_attrs) |\n| [ComponentTypes](#classtensorflow_1_1ops_1_1_priority_queue_1a4bf430a0014584ae607d39e9baf2bec2)`(const DataTypeSlice & x)` | [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/priority-queue/attrs#structtensorflow_1_1ops_1_1_priority_queue_1_1_attrs) |\n| [Container](#classtensorflow_1_1ops_1_1_priority_queue_1aed5d6a8c02b6008dbc0bbd5244966901)`(StringPiece x)` | [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/priority-queue/attrs#structtensorflow_1_1ops_1_1_priority_queue_1_1_attrs) |\n| [SharedName](#classtensorflow_1_1ops_1_1_priority_queue_1a27e53635a6e2a4732caef1194ed237b8)`(StringPiece x)` | [Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/priority-queue/attrs#structtensorflow_1_1ops_1_1_priority_queue_1_1_attrs) |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::PriorityQueue::Attrs](/versions/r2.14/api_docs/cc/struct/tensorflow/ops/priority-queue/attrs) | Optional attribute setters for [PriorityQueue](/versions/r2.14/api_docs/cc/class/tensorflow/ops/priority-queue#classtensorflow_1_1ops_1_1_priority_queue). |\n\nPublic attributes\n-----------------\n\n### handle\n\n```text\n::tensorflow::Output handle\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### PriorityQueue\n\n```gdscript\n PriorityQueue(\n const ::tensorflow::Scope & scope,\n const gtl::ArraySlice\u003c PartialTensorShape \u003e & shapes\n)\n``` \n\n### PriorityQueue\n\n```gdscript\n PriorityQueue(\n const ::tensorflow::Scope & scope,\n const gtl::ArraySlice\u003c PartialTensorShape \u003e & shapes,\n const PriorityQueue::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### Capacity\n\n```text\nAttrs Capacity(\n int64 x\n)\n``` \n\n### ComponentTypes\n\n```gdscript\nAttrs ComponentTypes(\n const DataTypeSlice & x\n)\n``` \n\n### Container\n\n```text\nAttrs Container(\n StringPiece x\n)\n``` \n\n### SharedName\n\n```text\nAttrs SharedName(\n StringPiece x\n)\n```"]]