จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: สิ่งกีดขวางปิด
#include <data_flow_ops.h>
ปิดสิ่งกีดขวางที่กำหนด
สรุป
การดำเนินการนี้ส่งสัญญาณว่าจะไม่มีการแทรกองค์ประกอบใหม่เข้าไปในสิ่งกีดขวางที่กำหนดอีกต่อไป InsertMany ภายหลังที่พยายามแนะนำคีย์ใหม่จะล้มเหลว การดำเนินการ InsertMany ภายหลังที่เพิ่งเพิ่มส่วนประกอบที่ขาดหายไปให้กับองค์ประกอบที่มีอยู่แล้วจะยังคงประสบความสำเร็จต่อไป การดำเนินการ TakeMany ครั้งต่อไปจะยังคงประสบความสำเร็จต่อไปหากองค์ประกอบที่เสร็จสมบูรณ์เพียงพอยังคงอยู่ในอุปสรรค การดำเนินการ TakeMany ภายหลังที่จะบล็อกจะล้มเหลวทันที
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- ที่จับ: ที่จับกับสิ่งกีดขวาง
แอ็ตทริบิวต์ทางเลือก (ดู Attrs
):
- cancel_pending_enqueues: หากเป็นจริง คำขอที่รอดำเนินการทั้งหมดซึ่งถูกบล็อกในคิวของสิ่งกีดขวางจะถูกยกเลิก InsertMany จะล้มเหลวแม้ว่าจะไม่มีการแนะนำรหัสใหม่ก็ตาม
ผลตอบแทน:
คุณลักษณะสาธารณะ
งานสาธารณะ
ตัวดำเนินการ::เทนเซอร์โฟลว์::การทำงาน
operator::tensorflow::Operation() const
ฟังก์ชันคงที่สาธารณะ
ยกเลิกรอคิว
Attrs CancelPendingEnqueues(
bool x
)
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# tensorflow::ops::BarrierClose Class Reference\n\ntensorflow::ops::BarrierClose\n=============================\n\n`#include \u003cdata_flow_ops.h\u003e`\n\nCloses the given barrier.\n\nSummary\n-------\n\nThis operation signals that no more new elements will be inserted in the given barrier. Subsequent InsertMany that try to introduce a new key will fail. Subsequent InsertMany operations that just add missing components to already existing elements will continue to succeed. Subsequent TakeMany operations will continue to succeed if sufficient completed elements remain in the barrier. Subsequent TakeMany operations that would block will fail immediately.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- handle: The handle to a barrier.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/barrier-close/attrs#structtensorflow_1_1ops_1_1_barrier_close_1_1_attrs)):\n\n- cancel_pending_enqueues: If true, all pending enqueue requests that are blocked on the barrier's queue will be canceled. InsertMany will fail, even if no new key is introduced.\n\n\u003cbr /\u003e\n\nReturns:\n\n- the created [Operation](/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation)\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [BarrierClose](#classtensorflow_1_1ops_1_1_barrier_close_1aabb1e96c2ddec0a750259ec2e864f33f)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` handle)` ||\n| [BarrierClose](#classtensorflow_1_1ops_1_1_barrier_close_1a34f077164e4cf9752ac97c5a4969a63e)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` handle, const `[BarrierClose::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/barrier-close/attrs#structtensorflow_1_1ops_1_1_barrier_close_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_barrier_close_1a130fa096afe314a0ad50f3e66e7ee67f) | [Operation](/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------|---------|\n| [operator::tensorflow::Operation](#classtensorflow_1_1ops_1_1_barrier_close_1a5af7233cd95d1c3e01481903033604b0)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|-----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|\n| [CancelPendingEnqueues](#classtensorflow_1_1ops_1_1_barrier_close_1ac01860430003fae988082eeb43ac543c)`(bool x)` | [Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/barrier-close/attrs#structtensorflow_1_1ops_1_1_barrier_close_1_1_attrs) |\n\n| ### Structs ||\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::BarrierClose::Attrs](/versions/r2.0/api_docs/cc/struct/tensorflow/ops/barrier-close/attrs) | Optional attribute setters for [BarrierClose](/versions/r2.0/api_docs/cc/class/tensorflow/ops/barrier-close#classtensorflow_1_1ops_1_1_barrier_close). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### BarrierClose\n\n```gdscript\n BarrierClose(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input handle\n)\n``` \n\n### BarrierClose\n\n```gdscript\n BarrierClose(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input handle,\n const BarrierClose::Attrs & attrs\n)\n``` \n\n### operator::tensorflow::Operation\n\n```gdscript\n operator::tensorflow::Operation() const \n``` \n\nPublic static functions\n-----------------------\n\n### CancelPendingEnqueues\n\n```text\nAttrs CancelPendingEnqueues(\n bool x\n)\n```"]]