tensorflow::ops::ReduceJoin
#include <string_ops.h>รวม เทนเซอร์ สตริงเข้าด้วยกันตามมิติที่กำหนด
สรุป
คำนวณการเชื่อมต่อสตริงข้ามมิติใน เทนเซอร์ สตริงที่กำหนดซึ่งมีรูปร่าง [\\(d_0, d_1, ..., d_{n-1}\\)] ส่งคืน เทนเซอร์ ใหม่ที่สร้างขึ้นโดยการรวมสตริงอินพุตด้วยตัวคั่นที่กำหนด (ค่าเริ่มต้น: สตริงว่าง) ดัชนีติดลบจะนับถอยหลังจากท้าย โดย -1 เทียบเท่ากับ n - 1 หากไม่ได้ระบุดัชนี จะทำการรวมในทุกมิติโดยเริ่มจาก n - 1 ถึง 0
ตัวอย่างเช่น:
# tensor `a` is [["a", "b"], ["c", "d"]] tf.reduce_join(a, 0) ==> ["ac", "bd"] tf.reduce_join(a, 1) ==> ["ab", "cd"] tf.reduce_join(a, -2) = tf.reduce_join(a, 0) ==> ["ac", "bd"] tf.reduce_join(a, -1) = tf.reduce_join(a, 1) ==> ["ab", "cd"] tf.reduce_join(a, 0, keep_dims=True) ==> [["ac", "bd"]] tf.reduce_join(a, 1, keep_dims=True) ==> [["ab"], ["cd"]] tf.reduce_join(a, 0, separator=".") ==> ["a.c", "b.d"] tf.reduce_join(a, [0, 1]) ==> "acbd" tf.reduce_join(a, [1, 0]) ==> "abcd" tf.reduce_join(a, []) ==> [["a", "b"], ["c", "d"]] tf.reduce_join(a) = tf.reduce_join(a, [1, 0]) ==> "abcd"
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- อินพุต: ข้อมูลที่จะนำมาเชื่อมต่อกัน ดัชนีที่ลดขนาด ทั้งหมด ต้องมีขนาดไม่เป็นศูนย์
- reduction_indices: มิติที่จะใช้ในการลดขนาด โดยมิติจะถูกลดขนาดตามลำดับที่ระบุ การไม่ระบุ
reduction_indicesจะเทียบเท่ากับการส่งค่า[n-1, n-2, ..., 0]รองรับค่าดัชนีติดลบตั้งแต่-nถึง-1
คุณลักษณะเสริม (ดูที่ Attrs ):
- keep_dims: ถ้า
Trueจะคงขนาดที่ลดลงไว้โดยมีความยาว1 - ตัวคั่น: ตัวคั่นที่จะใช้เมื่อทำการเชื่อมต่อ
การส่งคืนสินค้า:
-
Output: มีรูปร่างเหมือนกับอินพุต โดยลบมิติที่ลดลงออกหรือตั้งค่าเป็น1ขึ้นอยู่กับkeep_dims
ตัวสร้างและตัวทำลาย | |
|---|---|
ReduceJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input reduction_indices) | |
ReduceJoin (const :: tensorflow::Scope & scope, :: tensorflow::Input inputs, :: tensorflow::Input reduction_indices, const ReduceJoin::Attrs & attrs) |
คุณลักษณะสาธารณะ | |
|---|---|
operation | |
output | |
หน้าที่สาธารณะ | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
ฟังก์ชันคงที่สาธารณะ | |
|---|---|
KeepDims (bool x) | |
Separator (StringPiece x) | |
โครงสร้าง | |
|---|---|
| tensorflow::ops::ReduceJoin::Attrs | ตัวเลือกในการตั้งค่าแอตทริบิวต์สำหรับ ReduceJoin |
คุณลักษณะสาธารณะ
การดำเนินการ
Operation operation
เอาต์พุต
::tensorflow::Output output
หน้าที่สาธารณะ
ลดการมีส่วนร่วม
ReduceJoin( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input reduction_indices )
ลดการมีส่วนร่วม
ReduceJoin( const ::tensorflow::Scope & scope, ::tensorflow::Input inputs, ::tensorflow::Input reduction_indices, const ReduceJoin::Attrs & attrs )
โหนด
::tensorflow::Node * node() const
ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต
operator::tensorflow::Input() const
ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต
operator::tensorflow::Output() const
ฟังก์ชันคงที่สาธารณะ
คีปดิมส์
Attrs KeepDims( bool x )
ตัวคั่น
Attrs Separator( StringPiece x )