tensorflow:: אופס:: UnsortedSegmentJoin

#include <string_ops.h>

מצטרף לרכיבי inputs המבוססים על segment_ids .

סיכום

מחשב את חיבור המיתר לאורך מקטעים של טנזור. נתון segment_ids עם דרגה N data עם דרגה N+M :

`output[i, k1...kM] = strings.join([data[j1...jN, k1...kM])`

כאשר החיבור הוא על כל [j1...jN] כך ש-segment_ids[j1...jN] = i. מחרוזות מצטרפות בסדר שורה עיקרית.

לדוגמה:

inputs = [['Y', 'q', 'c'], ['Y', '6', '6'], ['p', 'G', 'a']]
output_array = string_ops.unsorted_segment_join(inputs=inputs,
                                                segment_ids=[1, 0, 1],
                                                num_segments=2,
                                                separator=':'))
# output_array ==> [['Y', '6', '6'], ['Y:p', 'q:G', 'c:a']]

inputs = ['this', 'is', 'a', 'test']
output_array = string_ops.unsorted_segment_join(inputs=inputs,
                                                segment_ids=[0, 0, 0, 0],
                                                num_segments=1,
                                                separator=':'))
# output_array ==> ['this:is:a:test']

טיעונים:

  • scope: אובייקט Scope
  • קלט: הקלט שיש להצטרף אליו.
  • segment_ids: טנסור שצורתו היא קידומת של data.shape. מזהי פלחים שליליים אינם נתמכים.
  • num_segments: סקלר.

מאפיינים אופציונליים (ראה Attrs ):

  • מפריד: המפריד לשימוש בעת ההצטרפות.

החזרות:

  • Output : טנסור הפלט.

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

UnsortedSegmentJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input segment_ids, :: tensorflow::Input num_segments)
UnsortedSegmentJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input segment_ids, :: tensorflow::Input num_segments, const UnsortedSegmentJoin::Attrs & attrs)

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

operation
output

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

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

פונקציות סטטיות ציבוריות

Separator (StringPiece x)

מבנים

tensorflow:: ops:: UnsortedSegmentJoin:: Attrs

מגדירי תכונות אופציונליים עבור UnsortedSegmentJoin .

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

מבצע

Operation operation

תְפוּקָה

::tensorflow::Output output

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

UnsortedSegmentJoin

 UnsortedSegmentJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input segment_ids,
  ::tensorflow::Input num_segments
)

UnsortedSegmentJoin

 UnsortedSegmentJoin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input inputs,
  ::tensorflow::Input segment_ids,
  ::tensorflow::Input num_segments,
  const UnsortedSegmentJoin::Attrs & attrs
)

צוֹמֶת

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

פונקציות סטטיות ציבוריות

מפריד

Attrs Separator(
  StringPiece x
)