tensorflow:: ops:: SparseBincount
#include <math_ops.h>סופר את מספר המופעים של כל ערך במערך שלם.
תַקצִיר
מפיק וקטור עם אורך size ואותו סוג d כמו weights . אם weights ריקים, אז index i מאחסן את מספר הפעמים שהערך i נספר ב- arr . אם weights אינם ריקים, אז index i מאחסן את סכום הערך ב- weights בכל אינדקס כאשר הערך המתאים ב- arr הוא i .
ערכים ב- arr מחוץ לטווח [0, size) אינם נלקחים בחשבון.
טיעונים:
- היקף: אובייקט היקף
- אינדקסים:
Tensorint64 דו-ממדי. - ערכים:
Tensorשלם חד-ממדי. - צורה_צפופה:
Tensorint64 חד-ממדי. - גודל:
Tensorסקלרי אינטימי לא שלילי. - weights: הוא
Tensorint32, int64, float32, או float64 עם אותה צורה כמוinput, אוTensorlength-0, ובמקרה כזה הוא פועל כמשקלים שווים ל-1.
מאפיינים אופציונליים (ראה Attrs ):
- binary_output: bool; האם הליבה צריכה לספור את הופעת האירועים או את מספרם.
החזרות:
-
Output:Tensorחד-ממדי עם אורך שווהsizeאוTensorדו-ממדי עם [batch_size,size]. הספירות או המשקלים המסוכמים עבור כל ערך בטווח [0, size].
בנאים והורסים | |
|---|---|
SparseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input indices, :: tensorflow::Input values, :: tensorflow::Input dense_shape, :: tensorflow::Input size, :: tensorflow::Input weights) | |
SparseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input indices, :: tensorflow::Input values, :: tensorflow::Input dense_shape, :: tensorflow::Input size, :: tensorflow::Input weights, const SparseBincount::Attrs & attrs) |
מאפיינים ציבוריים | |
|---|---|
operation | |
output | |
תפקידים ציבוריים | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
פונקציות סטטיות ציבוריות | |
|---|---|
BinaryOutput (bool x) | |
מבנים | |
|---|---|
| tensorflow:: ops:: SparseBincount:: Attrs | קובעי מאפיינים אופציונליים עבור SparseBincount . |
מאפיינים ציבוריים
מִבצָע
Operation operation
תְפוּקָה
::tensorflow::Output output
תפקידים ציבוריים
SparseBincount
SparseBincount( const ::tensorflow::Scope & scope, ::tensorflow::Input indices, ::tensorflow::Input values, ::tensorflow::Input dense_shape, ::tensorflow::Input size, ::tensorflow::Input weights )
SparseBincount
SparseBincount( const ::tensorflow::Scope & scope, ::tensorflow::Input indices, ::tensorflow::Input values, ::tensorflow::Input dense_shape, ::tensorflow::Input size, ::tensorflow::Input weights, const SparseBincount::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 ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2026-11-05 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2026-11-05 (שעון UTC)."],[],[]]