tensorflow:: אופס:: UnsortedSegmentMin

#include <math_ops.h>

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

סיכום

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

אופרטור זה דומה לאופרטור סכום המקטע הלא ממוין שנמצא (כאן) . במקום לחשב את הסכום על פני מקטעים, הוא מחשב את המינימום כך:

\(output_i = {j...} data_[j...]\) כאשר min הוא מעל tuples j... כך ש- segment_ids[j...] == i .

אם המינימום ריק עבור מזהה פלח נתון i , הוא מוציא את הערך הגדול ביותר האפשרי עבור הסוג המספרי הספציפי, output[i] = numeric_limits ::max() output[i] = numeric_limits ::max() .

לדוגמה:

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

אם מזהה הפלח הנתון i שלילי, אז הערך המתאים ירד, ולא ייכלל בתוצאה.

טיעונים:

  • scope: אובייקט Scope
  • segment_ids: טנסור שצורתו היא קידומת של data.shape .

החזרות:

  • Output : בעל צורה זהה לנתונים, למעט ממדי segment_ids.rank הראשונים, שמוחלפים במאפיין יחיד בעל גודל num_segments .

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

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

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

operation
output

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

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

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

מבצע

Operation operation

תְפוּקָה

::tensorflow::Output output

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

UnsortedSegmentMin

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

צוֹמֶת

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const