संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: SparseDenseCWISE जोड़ें
#include <sparse_ops.h>
इन विशेष नियमों का उपयोग करके एक SparseTensor और एक सघन Tensor जोड़ता है:
सारांश
(1) यदि पात्र हो, तो घने पक्ष को विरल पक्ष के समान आकार में प्रसारित करता है; (2) फिर, केवल SparseTensor के सूचकांकों द्वारा इंगित सघन मान ही सीवाइज जोड़ में भाग लेते हैं।
इन नियमों के अनुसार, परिणाम बिल्कुल समान सूचकांक और आकार के साथ एक तार्किक SparseTensor है, लेकिन संभवतः विभिन्न गैर-शून्य मानों के साथ। इस ऑप का आउटपुट परिणामी गैर-शून्य मान है।
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- sp_indices: 2-डी. SparseTensor में गैर-रिक्त मानों के सूचकांक के साथ
N x R
मैट्रिक्स, संभवतः विहित क्रम में नहीं। - sp_मान: 1-डी.
sp_indices
के अनुरूप N
गैर-रिक्त मान। - एसपी_आकार: 1-डी. इनपुट SparseTensor का आकार।
- घना:
R
-डी। सघन टेंसर ऑपरेंड।
रिटर्न:
-
Output
: 1-डी. N
मान जिन पर संचालित होते हैं।
सार्वजनिक गुण
सार्वजनिक समारोह
नोड
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ऑपरेटर::टेन्सरफ़्लो::आउटपुट
operator::tensorflow::Output() const
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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```"]]