संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: बिनकाउंट
#include <math_ops.h>
पूर्णांक सरणी में प्रत्येक मान की घटनाओं की संख्या की गणना करता है।
सारांश
लंबाई size
और weights
समान dtype वाला एक वेक्टर आउटपुट करता है। यदि weights
खाली है, तो सूचकांक i
उस संख्या को संग्रहीत करता है जितनी बार i
मान arr
में गिना जाता है। यदि weights
गैर-रिक्त हैं, तो सूचकांक i
प्रत्येक सूचकांक पर weights
में मूल्य के योग को संग्रहीत करता है जहां arr
में संबंधित मान i
है।
सीमा [0, आकार) के बाहर arr
में मानों को नजरअंदाज कर दिया जाता है।
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- गिरफ्तारी: int32
Tensor
। - आकार: गैर-नकारात्मक int32 स्केलर
Tensor
। - वज़न: एक int32, int64, फ्लोट32, या फ्लोट64
Tensor
है जिसका आकार arr
या लंबाई-0 Tensor
के समान है, जिस स्थिति में यह 1 के बराबर सभी भारों के रूप में कार्य करता है।
रिटर्न:
-
Output
: size
के बराबर लंबाई वाला 1डी Tensor
। [0, आकार) श्रेणी में प्रत्येक मान के लिए गणना या सारांशित भार।
सार्वजनिक गुण
सार्वजनिक समारोह
नोड
::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-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],[],null,["# tensorflow::ops::Bincount Class Reference\n\ntensorflow::ops::Bincount\n=========================\n\n`#include \u003cmath_ops.h\u003e`\n\nCounts the number of occurrences of each value in an integer array.\n\nSummary\n-------\n\nOutputs a vector with length `size` and the same dtype as `weights`. If `weights` are empty, then index `i` stores the number of times the value `i` is counted in `arr`. If `weights` are non-empty, then index `i` stores the sum of the value in `weights` at each index where the corresponding value in `arr` is `i`.\n\nValues in `arr` outside of the range \\[0, size) are ignored.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- arr: int32 [Tensor](/versions/r2.1/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor).\n- size: non-negative int32 scalar [Tensor](/versions/r2.1/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor).\n- weights: is an int32, int64, float32, or float64 [Tensor](/versions/r2.1/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) with the same shape as `arr`, or a length-0 [Tensor](/versions/r2.1/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor), in which case it acts as all weights equal to 1.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 1D [Tensor](/versions/r2.1/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) with length equal to `size`. The counts or summed weights for each value in the range \\[0, size).\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [Bincount](#classtensorflow_1_1ops_1_1_bincount_1aab467738732ef3a8009ad662ba4d3821)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` arr, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` size, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` weights)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [bins](#classtensorflow_1_1ops_1_1_bincount_1ac125b9a1515efa737f727151bfeaaa73) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_bincount_1ab09a9d72c4506a6911bfbe00775dde37) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_bincount_1a4e41f60ef9fb7473b6aa1d8b939e11db)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_bincount_1a3ac1f5104aacae7c5ed57e9a2094a80a)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_bincount_1a05eb54bb4dcf8b07c04cd58c4232d229)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### bins\n\n```text\n::tensorflow::Output bins\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### Bincount\n\n```gdscript\n Bincount(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input arr,\n ::tensorflow::Input size,\n ::tensorflow::Input weights\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```"]]