จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: InplaceUpdate
#include <array_ops.h>
อัพเดตแถวที่ระบุ 'i' ด้วยค่า 'v'
สรุป
คำนวณ x[i, :] = v; return x
เดิมทีฟังก์ชันนี้สามารถเปลี่ยนแปลงได้ แต่สำหรับการคอมไพล์ เราทำให้การดำเนินการนี้สร้าง / ดำเนินการกับสำเนาของ x
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- x: เทนเซอร์ประเภท
T
- ฉัน: เวกเตอร์ ดัชนีอยู่ในมิติซ้ายสุดของ
x
- v:
Tensor
ประเภท T ขนาดมิติเดียวกันกับ x ยกเว้นมิติแรกซึ่งจะต้องเท่ากับขนาดของ i
ผลตอบแทน:
-
Output
: Tensor
ประเภท T นามแฝงของ x
เนื้อหาของ y
ไม่ได้กำหนดไว้หากมีรายการซ้ำใน i
คุณลักษณะสาธารณะ
งานสาธารณะ
โหนด
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ตัวดำเนินการ::tensorflow::เอาต์พุต
operator::tensorflow::Output() const
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# tensorflow::ops::InplaceUpdate Class Reference\n\ntensorflow::ops::InplaceUpdate\n==============================\n\n`#include \u003carray_ops.h\u003e`\n\nUpdates specified rows 'i' with values 'v'.\n\nSummary\n-------\n\nComputes `x[i, :] = v; return x`.\n\nOriginally this function is mutative however for compilation we make this operation create / operate on a copy of `x`.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- x: A tensor of type `T`.\n- i: A vector. Indices into the left-most dimension of `x`.\n- v: A [Tensor](/versions/r2.3/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of type T. Same dimension sizes as x except the first dimension, which must be the same as i's size.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A [Tensor](/versions/r2.3/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of type T. An alias of `x`. The content of `y` is undefined if there are duplicates in `i`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [InplaceUpdate](#classtensorflow_1_1ops_1_1_inplace_update_1a61fe27a3358ffab9492ce7bfc2042de1)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` x, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` i, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` v)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_inplace_update_1a91189ac8c186d4220acb877550f734f2) | [Operation](/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [y](#classtensorflow_1_1ops_1_1_inplace_update_1aa179189c713747eac0e48c9e63fcc143) | `::`[tensorflow::Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_inplace_update_1a70386af06c7715d224f82022915de138)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_inplace_update_1a04ab1445ae7b42549a58ffa9ebf5699a)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_inplace_update_1acc127f3b9cf898b32b2c1fd0ab8da6d3)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### y\n\n```text\n::tensorflow::Output y\n``` \n\nPublic functions\n----------------\n\n### InplaceUpdate\n\n```gdscript\n InplaceUpdate(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input x,\n ::tensorflow::Input i,\n ::tensorflow::Input v\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```"]]