tensorflow:: אופס:: SegmentMax

#include <math_ops.h>

מחשב את המקסימום לאורך מקטעים של טנזור.

סיכום

קרא את הקטע על פילוח להסבר על הפלחים.

מחשב טנזור כך ש- \(output_i = (data_j)\) שבו max הוא מעל j כך ש- segment_ids[j] == i .

אם המקסימום ריק עבור מזהה פלח נתון i , output[i] = 0 .

לדוגמה:

c = tf.constant([[1,2,3,4], [4, 3, 2, 1], [5,6,7,8]])
tf.segment_max(c, tf.constant([0, 0, 1]))
# ==> [[4, 3, 3, 4],
#      [5, 6, 7, 8]]

טיעונים:

  • scope: אובייקט Scope
  • segment_ids: טנזור 1-D שגודלו שווה לגודל הממד הראשון של data . יש למיין את הערכים וניתן לחזור עליהם.

החזרות:

  • Output : בעל צורה זהה לנתונים, למעט ממד 0 שיש לו גודל k , מספר המקטעים.

בנאים והורסים

SegmentMax (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input segment_ids)

תכונות ציבוריות

operation
output

תפקידים ציבוריים

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

תכונות ציבוריות

מבצע

Operation operation

תְפוּקָה

::tensorflow::Output output

תפקידים ציבוריים

SegmentMax

 SegmentMax(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input data,
  ::tensorflow::Input segment_ids
)

צוֹמֶת

::tensorflow::Node * node() const 

מפעיל::tensorflow::קלט

 operator::tensorflow::Input() const 

אופרטור::tensorflow::פלט

 operator::tensorflow::Output() const