tensorflow:: ops:: SparseSegmentSum
#include <math_ops.h>מחשב את הסכום לאורך מקטעים דלילים של טנזור.
תַקצִיר
קראו את הפרק על פילוח לקבלת הסבר על פלחים.
כמו SegmentSum , אבל segment_ids יכול להיות בעל דירוג נמוך מהמימד הראשון של data , תוך בחירת תת-קבוצה של מימד 0, המצוין על ידי indices .
לְדוּגמָה:
c = tf.constant([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]])
# Select two rows, one segment. tf.sparse_segment_sum(c, tf.constant([0, 1]), tf.constant([0, 0])) # => [[0 0 0 0]]
# Select two rows, two segment. tf.sparse_segment_sum(c, tf.constant([0, 1]), tf.constant([0, 1])) # => [[ 1 2 3 4] # [-1 -2 -3 -4]]
# Select all rows, two segments. tf.sparse_segment_sum(c, tf.constant([0, 1, 2]), tf.constant([0, 0, 1])) # => [[0 0 0 0] # [5 6 7 8]]
# Which is equivalent to: tf.segment_sum(c, tf.constant([0, 0, 1]))
טיעונים:
- היקף: אובייקט היקף
- אינדקסים: טנזור חד-ממדי. בעל דירוג זהה ל-
segment_ids. - segment_ids: טנזור חד-ממדי. הערכים צריכים להיות ממוינים וניתן לחזור עליהם.
החזרות:
-
Output: בעל צורה זהה לנתונים, למעט ממד 0 שגודלוk, מספר הקטעים.
בנאים והורסים | |
|---|---|
SparseSegmentSum (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input indices, :: tensorflow::Input segment_ids) |
מאפיינים ציבוריים | |
|---|---|
operation | |
output | |
תפקידים ציבוריים | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
מאפיינים ציבוריים
מִבצָע
Operation operation
תְפוּקָה
::tensorflow::Output output
תפקידים ציבוריים
סכום קטעים דליל
SparseSegmentSum( const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input indices, ::tensorflow::Input segment_ids )
צוֹמֶת
::tensorflow::Node * node() const
אופרטור::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2026-11-05 (שעון UTC).
[null,null,["עדכון אחרון: 2026-11-05 (שעון UTC)."],[],[]]