เทนเซอร์โฟลว์:: ปฏิบัติการ:: SparseSumรวม
#include <math_ops.h>คำนวณผลรวมตามส่วนที่กระจัดกระจายของเมตริกซ์
สรุป
อ่าน ส่วนเกี่ยวกับการแบ่งส่วน เพื่อดูคำอธิบายของส่วนต่างๆ
 เช่นเดียวกับ SegmentSum แต่ segment_ids สามารถมีอันดับน้อยกว่ามิติข้อมูลแรกของ data โดยเลือกชุดย่อยของมิติ 0 ที่ระบุโดย indices
ตัวอย่างเช่น:
c = tf.constant([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]])
# Select two rows, one segment. tf.sparse_segment_sum(c, tf.constant([0, 1]), tf.constant([0, 0])) # => [[0 0 0 0]]
# Select two rows, two segment. tf.sparse_segment_sum(c, tf.constant([0, 1]), tf.constant([0, 1])) # => [[ 1 2 3 4] # [-1 -2 -3 -4]]
# Select all rows, two segments. tf.sparse_segment_sum(c, tf.constant([0, 1, 2]), tf.constant([0, 0, 1])) # => [[0 0 0 0] # [5 6 7 8]]
# Which is equivalent to: tf.segment_sum(c, tf.constant([0, 0, 1]))
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
-  ดัชนี: เทนเซอร์ 1-D มีอันดับเดียวกันกับ segment_ids
- Segment_ids: เทนเซอร์ 1 มิติ ควรเรียงลำดับค่าและสามารถทำซ้ำได้
ผลตอบแทน:
-  Output: มีรูปร่างเหมือนกับข้อมูล ยกเว้นมิติ 0 ซึ่งมีขนาดkคือจำนวนเซ็กเมนต์
| ตัวสร้างและผู้ทำลาย | |
|---|---|
| SparseSegmentSum (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input indices, :: tensorflow::Input segment_ids) | 
| คุณลักษณะสาธารณะ | |
|---|---|
| operation | |
| output | |
| งานสาธารณะ | |
|---|---|
| node () const | ::tensorflow::Node * | 
| operator::tensorflow::Input () const | |
| operator::tensorflow::Output () const | |
คุณลักษณะสาธารณะ
การดำเนินการ
Operation operation
เอาท์พุท
::tensorflow::Output output
งานสาธารณะ
SparseSumรวม
SparseSegmentSum( const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input indices, ::tensorflow::Input segment_ids )
โหนด
::tensorflow::Node * node() const
ตัวดำเนินการ::tensorflow::อินพุต
operator::tensorflow::Input() const
ตัวดำเนินการ::tensorflow::เอาต์พุต
operator::tensorflow::Output() const