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

#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)

โครงสร้าง

เทนเซอร์โฟลว์ :: ops :: ลดเข้าร่วม :: Attrs

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

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

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

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 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

KeepDims

Attrs KeepDims(
  bool x
)

ตัวคั่น

Attrs Separator(
  StringPiece x
)