تدفق التوتر:: العمليات:: 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] بحيث يكون section_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']

الحجج:

  • النطاق: كائن النطاق
  • المدخلات: المدخلات التي سيتم ضمها.
  • section_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
)