tensorflow:: אופס:: SparseReduceSum
#include <sparse_ops.h>
מחשב את סכום האלמנטים על פני ממדים של SparseTensor.
סיכום
אופ זה לוקח SparseTensor והוא המקביל הדליל ל- tf.reduce_sum()
. בפרט, האופ הזה גם מחזיר Tensor
צפוף במקום דליל.
מפחית sp_input
לאורך הממדים הניתנים ב- reduction_axes
. אלא אם כן keep_dims
נכון, דרגת הטנזור מופחתת ב-1 עבור כל ערך ב- reduction_axes
. אם keep_dims
נכון, הממדים המופחתים נשמרים עם אורך 1.
אם reduction_axes
אין ערכים, כל הממדים מצטמצמים ומוחזר טנזור עם אלמנט בודד. בנוסף, הצירים יכולים להיות שליליים, המתפרשים לפי כללי האינדקס ב-Python.
טיעונים:
- scope: אובייקט Scope
- input_indexes: 2-D. מטריצת
N x R
עם המדדים של ערכים לא ריקים ב-SparseTensor, אולי לא בסדר קנוני. - input_values: 1-D.
N
non-empty values corresponding toinput_indices
. - input_shape: 1-D. צורת הקלט SparseTensor.
- הפחתה_צירים: 1-D. Length-
K
וקטור המכיל את צירי ההפחתה.
מאפיינים אופציונליים (ראה Attrs
):
- keep_dims: If true, retain reduced dimensions with length 1.
החזרות:
בנאים והורסים | |
---|---|
SparseReduceSum (const :: tensorflow::Scope & scope, :: tensorflow::Input input_indices, :: tensorflow::Input input_values, :: tensorflow::Input input_shape, :: tensorflow::Input reduction_axes) | |
SparseReduceSum (const :: tensorflow::Scope & scope, :: tensorflow::Input input_indices, :: tensorflow::Input input_values, :: tensorflow::Input input_shape, :: tensorflow::Input reduction_axes, const SparseReduceSum::Attrs & attrs) |
תכונות ציבוריות | |
---|---|
operation | |
output |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
פונקציות סטטיות ציבוריות | |
---|---|
KeepDims (bool x) |
מבנים | |
---|---|
tensorflow:: ops:: SparseReduceSum:: Attrs | קובעי תכונות אופציונליים עבור SparseReduceSum . |
תכונות ציבוריות
מבצע
Operation operation
תְפוּקָה
::tensorflow::Output output
תפקידים ציבוריים
SparseReduceSum
SparseReduceSum( const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape, ::tensorflow::Input reduction_axes )
SparseReduceSum
SparseReduceSum( const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape, ::tensorflow::Input reduction_axes, const SparseReduceSum::Attrs & attrs )
צוֹמֶת
::tensorflow::Node * node() const
מפעיל::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
פונקציות סטטיות ציבוריות
KeepDims
Attrs KeepDims( bool x )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2023-12-01 (שעון UTC).