Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
tensoreflusso:: ops:: PriorityQueue
#include <data_flow_ops.h>
Una coda che produce elementi ordinati in base al valore del primo componente.
Riepilogo
Tieni presente che PriorityQueue richiede che il primo componente di qualsiasi elemento sia un int64 scalare, oltre agli altri elementi dichiarati da componente_types. Pertanto le chiamate a Enqueue e EnqueueMany (rispettivamente Dequeue e DequeueMany) su una PriorityQueue richiederanno tutte (rispettivamente output) una voce aggiuntiva nei loro elenchi di input (rispettivamente output).
Argomenti:
- scope: un oggetto Scope
- forme: la forma di ciascun componente in un valore. La lunghezza di questo attributo deve essere 0 o uguale alla lunghezza di Component_Types. Se la lunghezza di questo attributo è 0, le forme degli elementi della coda non sono vincolate e solo un elemento alla volta può essere rimosso dalla coda.
Attributi facoltativi (vedi Attrs
):
- Component_types: il tipo di ciascun componente in un valore.
- capacità: il limite superiore del numero di elementi in questa coda. I numeri negativi non indicano alcun limite.
- contenitore: se non vuota, questa coda viene inserita nel contenitore specificato. Altrimenti, viene utilizzato un contenitore predefinito.
- shared_name: se non vuota, questa coda verrà condivisa con il nome specificato in più sessioni.
Resi:
Attributi pubblici
Funzioni pubbliche
PriorityQueue
PriorityQueue(
const ::tensorflow::Scope & scope,
const gtl::ArraySlice< PartialTensorShape > & shapes
)
nodo
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operatore::tensorflow::Output
operator::tensorflow::Output() const
Funzioni pubbliche statiche
Capacità
Attrs Capacity(
int64 x
)
ComponentTypes
Attrs ComponentTypes(
const DataTypeSlice & x
)
Contenitore
Attrs Container(
StringPiece x
)
Nome condiviso
Attrs SharedName(
StringPiece x
)
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[null,null,["Ultimo aggiornamento 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```"]]