จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: ผสาน
#include <control_flow_ops.h>
ส่งต่อค่าของเทนเซอร์ที่มีอยู่จาก inputs
ไปยัง output
สรุป
Merge
จะรอให้เทนเซอร์อย่างน้อยหนึ่งตัวใน inputs
พร้อมใช้งาน โดยปกติจะใช้ร่วมกับ Switch
เพื่อดำเนินการแยกสาขา
Merge
ส่งต่อเทนเซอร์ตัวแรกเพื่อให้พร้อมใช้งานสำหรับ output
และตั้ง value_index
เป็นดัชนีใน inputs
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- อินพุต: เทนเซอร์อินพุต ซึ่งหนึ่งในนั้นจะพร้อมใช้งาน
ผลตอบแทน:
- เอาต์พุต
Output
: จะถูกตั้งค่าเป็นเทนเซอร์อินพุตที่มีอยู่ -
Output
value_index: ดัชนีของเทนเซอร์อินพุตที่เลือกใน inputs
คุณลักษณะสาธารณะ
งานสาธารณะ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[null,null,["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],null,["# tensorflow::ops::Merge Class Reference\n\ntensorflow::ops::Merge\n======================\n\n`#include \u003ccontrol_flow_ops.h\u003e`\n\nForwards the value of an available tensor from `inputs` to `output`.\n\nSummary\n-------\n\n[Merge](/versions/r2.2/api_docs/cc/class/tensorflow/ops/merge#classtensorflow_1_1ops_1_1_merge) waits for at least one of the tensors in `inputs` to become available. It is usually combined with [Switch](/versions/r2.2/api_docs/cc/class/tensorflow/ops/switch#classtensorflow_1_1ops_1_1_switch) to implement branching.\n\n[Merge](/versions/r2.2/api_docs/cc/class/tensorflow/ops/merge#classtensorflow_1_1ops_1_1_merge) forwards the first tensor to become available to `output`, and sets `value_index` to its index in `inputs`.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- inputs: The input tensors, exactly one of which will become available.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) output: Will be set to the available input tensor.\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) value_index: The index of the chosen input tensor in `inputs`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Merge](#classtensorflow_1_1ops_1_1_merge_1a72704c3d1bf64aedb9bd82724f228c2a)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.2/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` inputs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_merge_1a3c9561c2129cfb34d16e93ebf40f9b73) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_merge_1ab0c85516a5cbe032d96abc1064a8fd9e) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [value_index](#classtensorflow_1_1ops_1_1_merge_1a354d34167c730ae8b9acf23087558904) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\n### value_index\n\n```scdoc\n::tensorflow::Output value_index\n``` \n\nPublic functions\n----------------\n\n### Merge\n\n```gdscript\n Merge(\n const ::tensorflow::Scope & scope,\n ::tensorflow::InputList inputs\n)\n```"]]