コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
テンソルフロー::作戦::優先キュー
#include <data_flow_ops.h>
最初のコンポーネント値でソートされた要素を生成するキュー。
まとめ
PriorityQueueでは、component_types で宣言された他の要素に加えて、要素の最初のコンポーネントがスカラー int64 である必要があることに注意してください。したがって、 PriorityQueueでの Enqueue および EnqueueMany (それぞれ Dequeue および DequeueMany) の呼び出しには、入力 (または出力) リストに 1 つの追加のエントリ (または出力) が必要になります。
引数:
- スコープ:スコープオブジェクト
- 形状: 値の各コンポーネントの形状。この属性の長さは 0 であるか、component_types の長さと同じである必要があります。この属性の長さが 0 の場合、キュー要素の形状は制約されず、一度に 1 つの要素だけをデキューできます。
オプションの属性 ( Attrs
を参照):
- Component_types: 値内の各コンポーネントのタイプ。
- 容量: このキュー内の要素数の上限。負の数は制限がないことを意味します。
- コンテナ: 空でない場合、このキューは指定されたコンテナに配置されます。それ以外の場合は、デフォルトのコンテナが使用されます。
- shared_name: 空でない場合、このキューは指定された名前で複数のセッション間で共有されます。
戻り値:
パブリック属性
公共機能
優先キュー
PriorityQueue(
const ::tensorflow::Scope & scope,
const gtl::ArraySlice< PartialTensorShape > & shapes
)
ノード
::tensorflow::Node * node() const
operator::tensorflow::Input() const
演算子::tensorflow::出力
operator::tensorflow::Output() const
パブリック静的関数
容量
Attrs Capacity(
int64 x
)
コンポーネントの種類
Attrs ComponentTypes(
const DataTypeSlice & x
)
容器
Attrs Container(
StringPiece x
)
共有名
Attrs SharedName(
StringPiece x
)
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-25 UTC。
[null,null,["最終更新日 2025-07-25 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/r1.15/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/r1.15/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\nArguments:\n\n- scope: A [Scope](/versions/r1.15/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/r1.15/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/r1.15/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/r1.15/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/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, const gtl::ArraySlice\u003c PartialTensorShape \u003e & shapes, const `[PriorityQueue::Attrs](/versions/r1.15/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/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_priority_queue_1a5117c5ab1c0164f94212f42c9d5e7e2e) | [Operation](/versions/r1.15/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/r1.15/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/r1.15/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/r1.15/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/r1.15/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/r1.15/api_docs/cc/struct/tensorflow/ops/priority-queue/attrs) | Optional attribute setters for [PriorityQueue](/versions/r1.15/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```"]]