تدفق التوتر:: العمليات:: BarrierTakeMany
#include <data_flow_ops.h>
يأخذ العدد المحدد من العناصر المكتملة من الحاجز.
ملخص
تقوم هذه العملية بتسلسل موتر مكون العنصر المكتمل على طول البعد 0 لإنشاء موتر مكون واحد.
تخرج العناصر من الحاجز عند اكتمالها، وبالترتيب الذي تم وضعها به في الحاجز. يوفر إخراج المؤشرات معلومات حول الدفعة التي تم إدراج كل عنصر فيها في الأصل في الحاجز.
الحجج:
- النطاق: كائن النطاق
- المقبض: المقبض إلى الحاجز.
- num_elements: موتر ذو عنصر واحد يحتوي على عدد العناصر المطلوب أخذها.
- Component_types: نوع كل مكون في القيمة.
السمات الاختيارية (انظر Attrs
):
- allow_small_batch: السماح بإرجاع أقل من num_elements من العناصر إذا كان الحاجز مغلقًا بالفعل.
- timeout_ms: إذا كانت قائمة الانتظار فارغة، فسيتم حظر هذه العملية لمدة تصل إلى timeout_ms ميلي ثانية. ملاحظة: هذا الخيار غير مدعوم حتى الآن.
العوائد:
- مؤشرات
Output
: موتر أحادي البعد للمؤشرات، بطول num_elems. تشير هذه المؤشرات إلى المجموعة التي تم وضع القيم فيها في الحاجز (بدءًا من MIN_LONG وزيادة مع كل BarrierInsertMany ). - مفاتيح
Output
: موتر مفاتيح أحادي البعد، بطول num_elements. - قيم
OutputList
: موتر واحد متعدد الأبعاد لكل مكون في عنصر الحاجز. جميع القيم لها طول num_elements في البعد 0.
البنائين والمدمرين | |
---|---|
BarrierTakeMany (const :: tensorflow::Scope & scope, :: tensorflow::Input handle, :: tensorflow::Input num_elements, const DataTypeSlice & component_types) | |
BarrierTakeMany (const :: tensorflow::Scope & scope, :: tensorflow::Input handle, :: tensorflow::Input num_elements, const DataTypeSlice & component_types, const BarrierTakeMany::Attrs & attrs) |
الصفات العامة | |
---|---|
indices | |
keys | |
operation | |
values |
وظائف ثابتة العامة | |
---|---|
AllowSmallBatch (bool x) | |
TimeoutMs (int64 x) | |
WaitForIncomplete (bool x) |
الهياكل | |
---|---|
Tensorflow:: ops:: BarrierTakeMany:: Attrs | محددات السمات الاختيارية لـ BarrierTakeMany . |
الصفات العامة
المؤشرات
::tensorflow::Output indices
مفاتيح
::tensorflow::Output keys
عملية
Operation operation
قيم
::tensorflow::OutputList values
الوظائف العامة
BarrierTakeMany
BarrierTakeMany( const ::tensorflow::Scope & scope, ::tensorflow::Input handle, ::tensorflow::Input num_elements, const DataTypeSlice & component_types )
BarrierTakeMany
BarrierTakeMany( const ::tensorflow::Scope & scope, ::tensorflow::Input handle, ::tensorflow::Input num_elements, const DataTypeSlice & component_types, const BarrierTakeMany::Attrs & attrs )
وظائف ثابتة العامة
السماح سمولباتش
Attrs AllowSmallBatch( bool x )
مهلةMs
Attrs TimeoutMs( int64 x )
انتظر غير مكتمل
Attrs WaitForIncomplete( bool x )
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# tensorflow::ops::BarrierTakeMany Class Reference\n\ntensorflow::ops::BarrierTakeMany\n================================\n\n`#include \u003cdata_flow_ops.h\u003e`\n\nTakes the given number of completed elements from a barrier.\n\nSummary\n-------\n\nThis operation concatenates completed-element component tensors along the 0th dimension to make a single component tensor.\n\nElements come out of the barrier when they are complete, and in the order in which they were placed into the barrier. The indices output provides information about the batch in which each element was originally inserted into the barrier.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- handle: The handle to a barrier.\n- num_elements: A single-element tensor containing the number of elements to take.\n- component_types: The type of each component in a value.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/barrier-take-many/attrs#structtensorflow_1_1ops_1_1_barrier_take_many_1_1_attrs)):\n\n- allow_small_batch: Allow to return less than num_elements items if barrier is already closed.\n- timeout_ms: If the queue is empty, this operation will block for up to timeout_ms milliseconds. Note: This option is not supported yet.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) indices: A one-dimensional tensor of indices, with length num_elems. These indices refer to the batch in which the values were placed into the barrier (starting with MIN_LONG and increasing with each [BarrierInsertMany](/versions/r2.1/api_docs/cc/class/tensorflow/ops/barrier-insert-many#classtensorflow_1_1ops_1_1_barrier_insert_many)).\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) keys: A one-dimensional tensor of keys, with length num_elements.\n- `OutputList` values: One any-dimensional tensor per component in a barrier element. [All](/versions/r2.1/api_docs/cc/class/tensorflow/ops/all#classtensorflow_1_1ops_1_1_all) values have length num_elements in the 0th dimension.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [BarrierTakeMany](#classtensorflow_1_1ops_1_1_barrier_take_many_1a7079c660a8be7b93534d6b9342549375)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` handle, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` num_elements, const DataTypeSlice & component_types)` ||\n| [BarrierTakeMany](#classtensorflow_1_1ops_1_1_barrier_take_many_1a0bbc5e5e2af22792ad5bd4a246591fc4)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` handle, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` num_elements, const DataTypeSlice & component_types, const `[BarrierTakeMany::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/barrier-take-many/attrs#structtensorflow_1_1ops_1_1_barrier_take_many_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|\n| [indices](#classtensorflow_1_1ops_1_1_barrier_take_many_1a43e71cac399402222c6beab7c297d2ff) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [keys](#classtensorflow_1_1ops_1_1_barrier_take_many_1aac3b84f41d8da26a1b15f6c3f8294a34) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_barrier_take_many_1ab7644c7503f6049a8eb1d9a50fa2217b) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [values](#classtensorflow_1_1ops_1_1_barrier_take_many_1a55d011199c39e515002a93b15e1358a9) | `::`[tensorflow::OutputList](/versions/r2.1/api_docs/cc/group/core#group__core_1gab449e6a3abd500c2f4ea93f9e89ba96c) |\n\n| ### Public static functions ||\n|-----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------|\n| [AllowSmallBatch](#classtensorflow_1_1ops_1_1_barrier_take_many_1a58a8882a1c18ccb037a4e5876d16abde)`(bool x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/barrier-take-many/attrs#structtensorflow_1_1ops_1_1_barrier_take_many_1_1_attrs) |\n| [TimeoutMs](#classtensorflow_1_1ops_1_1_barrier_take_many_1a31d75880ce856ac91e2eff9c8938ea12)`(int64 x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/barrier-take-many/attrs#structtensorflow_1_1ops_1_1_barrier_take_many_1_1_attrs) |\n| [WaitForIncomplete](#classtensorflow_1_1ops_1_1_barrier_take_many_1a7e1cffc4f5b0b94d3892d02b7843e02d)`(bool x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/barrier-take-many/attrs#structtensorflow_1_1ops_1_1_barrier_take_many_1_1_attrs) |\n\n| ### Structs ||\n|---------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::BarrierTakeMany::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/barrier-take-many/attrs) | Optional attribute setters for [BarrierTakeMany](/versions/r2.1/api_docs/cc/class/tensorflow/ops/barrier-take-many#classtensorflow_1_1ops_1_1_barrier_take_many). |\n\nPublic attributes\n-----------------\n\n### indices\n\n```text\n::tensorflow::Output indices\n``` \n\n### keys\n\n```text\n::tensorflow::Output keys\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\n### values\n\n```text\n::tensorflow::OutputList values\n``` \n\nPublic functions\n----------------\n\n### BarrierTakeMany\n\n```gdscript\n BarrierTakeMany(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input handle,\n ::tensorflow::Input num_elements,\n const DataTypeSlice & component_types\n)\n``` \n\n### BarrierTakeMany\n\n```gdscript\n BarrierTakeMany(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input handle,\n ::tensorflow::Input num_elements,\n const DataTypeSlice & component_types,\n const BarrierTakeMany::Attrs & attrs\n)\n``` \n\nPublic static functions\n-----------------------\n\n### AllowSmallBatch\n\n```text\nAttrs AllowSmallBatch(\n bool x\n)\n``` \n\n### TimeoutMs\n\n```text\nAttrs TimeoutMs(\n int64 x\n)\n``` \n\n### WaitForIncomplete\n\n```text\nAttrs WaitForIncomplete(\n bool x\n)\n```"]]