จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: เบาบางหนาแน่นCwiseเพิ่ม
#include <sparse_ops.h>
เพิ่ม SparseTensor และ Tensor แบบหนาแน่น โดยใช้กฎพิเศษเหล่านี้:
สรุป
(1) ออกอากาศด้านหนาแน่นให้มีรูปร่างเหมือนกับด้านเบาบาง หากเข้าเกณฑ์ (2) จากนั้น เฉพาะค่าความหนาแน่นที่ชี้โดยดัชนีของ SparseTensor เท่านั้นที่มีส่วนร่วมในการบวกแบบ cwise
ตามกฎเหล่านี้ ผลลัพธ์ที่ได้คือ SparseTensor แบบลอจิคัลที่มีดัชนีและรูปร่างเหมือนกันทุกประการ แต่อาจมีค่าที่ไม่ใช่ศูนย์ต่างกัน ผลลัพธ์ของ Op นี้คือผลลัพธ์ที่ไม่ใช่ค่าศูนย์
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- sp_indices: 2-D เมทริกซ์
N x R
พร้อมดัชนีของค่าที่ไม่ว่างเปล่าใน SparseTensor อาจไม่อยู่ในลำดับตามรูปแบบบัญญัติ - sp_values: 1-D
N
ค่าที่ไม่ว่างซึ่งสอดคล้องกับ sp_indices
- sp_shape: 1-D รูปร่างของอินพุต SparseTensor
- หนาแน่น:
R
-D ตัวถูกดำเนิน การเทนเซอร์ หนาแน่น
ผลตอบแทน:
-
Output
: 1-D ค่า N
ที่ดำเนินการ
คุณลักษณะสาธารณะ
งานสาธารณะ
โหนด
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ตัวดำเนินการ::tensorflow::เอาต์พุต
operator::tensorflow::Output() const
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-27 UTC
[null,null,["อัปเดตล่าสุด 2025-07-27 UTC"],[],[],null,["# tensorflow::ops::SparseDenseCwiseAdd Class Reference\n\ntensorflow::ops::SparseDenseCwiseAdd\n====================================\n\n`#include \u003csparse_ops.h\u003e`\n\nAdds up a SparseTensor and a dense [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor), using these special rules:\n\nSummary\n-------\n\n(1) Broadcasts the dense side to have the same shape as the sparse side, if eligible; (2) Then, only the dense values pointed to by the indices of the SparseTensor participate in the cwise addition.\n\nBy these rules, the result is a logical SparseTensor with exactly the same indices and shape, but possibly with different non-zero values. The output of this Op is the resultant non-zero values.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- sp_indices: 2-D. `N x R` matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering.\n- sp_values: 1-D. `N` non-empty values corresponding to `sp_indices`.\n- sp_shape: 1-D. Shape of the input SparseTensor.\n- dense: `R`-D. The dense [Tensor](/versions/r2.2/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) operand.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 1-D. The `N` values that are operated on.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [SparseDenseCwiseAdd](#classtensorflow_1_1ops_1_1_sparse_dense_cwise_add_1a40c54ec3d21552370675a287e1998c0f)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sp_indices, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sp_values, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` sp_shape, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` dense)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_sparse_dense_cwise_add_1a72eb8f04e1ba3079957c50afaaa13e79) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_sparse_dense_cwise_add_1afe9875882370618c9e8b76e5d1dccb26) | `::`[tensorflow::Output](/versions/r2.2/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_sparse_dense_cwise_add_1a4e49f5451389b499b3f51dfeb39146b6)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_sparse_dense_cwise_add_1ac05df51f21a0dc708e8ab33c853e5d6c)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_sparse_dense_cwise_add_1af0582cc0d8c6d71b9de9e50358f27392)`() const ` | ` ` ` ` |\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\nPublic functions\n----------------\n\n### SparseDenseCwiseAdd\n\n```gdscript\n SparseDenseCwiseAdd(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input sp_indices,\n ::tensorflow::Input sp_values,\n ::tensorflow::Input sp_shape,\n ::tensorflow::Input dense\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```"]]