tensorflow:: אופס:: RaggedBincount
#include <math_ops.h>
סופר את מספר המופעים של כל ערך במערך שלמים.
תַקצִיר
פלט וקטור עם size
אורך ואותו dtype כמו weights
. אם weights
ריקות, אינדקס i
מאחסן את מספר הפעמים שהערך i
נספר ב- arr
. אם weights
אינן ריקות, אז מדד i
מאחסן את סכום הערך weights
בכל מדד כאשר הערך המתאים ב- arr
הוא i
.
מתעלמים מערכים ב- arr
מחוץ לטווח [0, גודל).
טיעונים:
- scope: אובייקט Scope
- פיצולים: 1D int64
Tensor
. - ערכים: 2D int
Tensor
. - גודל: לא שלילי int scalar
Tensor
. - משקלים: הוא
Tensor
int32, int64, float32 או float64 עם אותה צורה כמוinput
, או אורך-0Tensor
, ובמקרה זה הוא פועל ככל המשקלים השווים ל-1.
מאפיינים אופציונליים (ראה Attrs
):
- binary_output: bool; האם על הקרנל לספור את המראה או את מספר ההתרחשויות.
החזרות:
-
Output
:Tensor
1D עם אורך שווהsize
או 2DTensor
עם [batch_size,size
]. הספירות או המשקלים המסוכמים עבור כל ערך בטווח [0, גודל).
בנאים והורסים | |
---|---|
RaggedBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input splits, :: tensorflow::Input values, :: tensorflow::Input size, :: tensorflow::Input weights) | |
RaggedBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input splits, :: tensorflow::Input values, :: tensorflow::Input size, :: tensorflow::Input weights, const RaggedBincount::Attrs & attrs) |
תכונות ציבוריות | |
---|---|
operation | |
output |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
פונקציות סטטיות ציבוריות | |
---|---|
BinaryOutput (bool x) |
מבנים | |
---|---|
tensorflow:: ops:: RaggedBincount:: Attrs | קובעי תכונות אופציונליים עבור RaggedBincount . |
תכונות ציבוריות
מִבצָע
Operation operation
תְפוּקָה
::tensorflow::Output output
תפקידים ציבוריים
RaggedBincount
RaggedBincount( const ::tensorflow::Scope & scope, ::tensorflow::Input splits, ::tensorflow::Input values, ::tensorflow::Input size, ::tensorflow::Input weights )
RaggedBincount
RaggedBincount( const ::tensorflow::Scope & scope, ::tensorflow::Input splits, ::tensorflow::Input values, ::tensorflow::Input size, ::tensorflow::Input weights, const RaggedBincount::Attrs & attrs )
צוֹמֶת
::tensorflow::Node * node() const
מפעיל::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
פונקציות סטטיות ציבוריות
פלט בינארי
Attrs BinaryOutput( bool x )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[],[],null,["# tensorflow::ops::RaggedBincount Class Reference\n\ntensorflow::ops::RaggedBincount\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.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- splits: 1D int64 [Tensor](/versions/r2.3/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor).\n- values: 2D int [Tensor](/versions/r2.3/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor).\n- size: non-negative int scalar [Tensor](/versions/r2.3/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor).\n- weights: is an int32, int64, float32, or float64 [Tensor](/versions/r2.3/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) with the same shape as `input`, or a length-0 [Tensor](/versions/r2.3/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\nOptional attributes (see [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/ragged-bincount/attrs#structtensorflow_1_1ops_1_1_ragged_bincount_1_1_attrs)):\n\n- binary_output: bool; Whether the kernel should count the appearance or number of occurrences.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.3/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): 1D [Tensor](/versions/r2.3/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) with length equal to `size` or 2D [Tensor](/versions/r2.3/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) with \\[batch_size, `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| [RaggedBincount](#classtensorflow_1_1ops_1_1_ragged_bincount_1af6554de96f809fccbd678adaffbc3c24)`(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)` splits, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` values, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` size, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` weights)` ||\n| [RaggedBincount](#classtensorflow_1_1ops_1_1_ragged_bincount_1ab10c029cf1e632fc88ce35a983cecd43)`(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)` splits, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` values, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` size, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` weights, const `[RaggedBincount::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/ragged-bincount/attrs#structtensorflow_1_1ops_1_1_ragged_bincount_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_ragged_bincount_1a733325350aabe10af880482ad5e1f9e0) | [Operation](/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_ragged_bincount_1a29aa4960a91cfce90a6ff9b5bdd8f47d) | `::`[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_ragged_bincount_1ab80b688c6e079f3cb485c27bae9fc4f6)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_ragged_bincount_1a3ee830fe3366afe1d6d8185e5d362999)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_ragged_bincount_1a0258579a8e475e40192adf1f9d54b806)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------|\n| [BinaryOutput](#classtensorflow_1_1ops_1_1_ragged_bincount_1a9853523da24b28968c4a53efae303ab9)`(bool x)` | [Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/ragged-bincount/attrs#structtensorflow_1_1ops_1_1_ragged_bincount_1_1_attrs) |\n\n| ### Structs ||\n|------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::RaggedBincount::Attrs](/versions/r2.3/api_docs/cc/struct/tensorflow/ops/ragged-bincount/attrs) | Optional attribute setters for [RaggedBincount](/versions/r2.3/api_docs/cc/class/tensorflow/ops/ragged-bincount#classtensorflow_1_1ops_1_1_ragged_bincount). |\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### RaggedBincount\n\n```gdscript\n RaggedBincount(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input splits,\n ::tensorflow::Input values,\n ::tensorflow::Input size,\n ::tensorflow::Input weights\n)\n``` \n\n### RaggedBincount\n\n```gdscript\n RaggedBincount(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input splits,\n ::tensorflow::Input values,\n ::tensorflow::Input size,\n ::tensorflow::Input weights,\n const RaggedBincount::Attrs & attrs\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``` \n\nPublic static functions\n-----------------------\n\n### BinaryOutput\n\n```text\nAttrs BinaryOutput(\n bool x\n)\n```"]]