tensorflow::ops::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']ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- อินพุต: ข้อมูลที่จะนำมาเชื่อมต่อ
- segment_ids: เทนเซอร์ที่มีรูปร่างเป็นคำนำหน้าของ data.shape ไม่รองรับ segment ids ที่เป็นค่าลบ
- จำนวนเซกเมนต์: ค่าสเกลาร์
คุณลักษณะเสริม (ดูที่ 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( 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
ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต
operator::tensorflow::Input() const
ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต
operator::tensorflow::Output() const
ฟังก์ชันคงที่สาธารณะ
ตัวคั่น
Attrs Separator( StringPiece x )