เทนเซอร์โฟลว์:: ปฏิบัติการ:: ไม่มีการเรียงลำดับเซ็กเมนต์เข้าร่วม

#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] ทั้งหมด โดยที่เซ็กเมนต์_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']

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • อินพุต: อินพุตที่จะเข้าร่วม
  • 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)

โครงสร้าง

เทนเซอร์โฟลว์ :: ops :: UnsortedSegmentJoin :: Attrs

ตัวตั้งค่าแอ็ตทริบิวต์ทางเลือกสำหรับ UnsortedSegmentJoin

คุณลักษณะสาธารณะ

การดำเนินการ

Operation operation

เอาท์พุท

::tensorflow::Output 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
)

โหนด

::tensorflow::Node * node() const 

ตัวดำเนินการ::tensorflow::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::tensorflow::เอาต์พุต

 operator::tensorflow::Output() const 

ฟังก์ชันคงที่สาธารณะ

ตัวคั่น

Attrs Separator(
  StringPiece x
)