เทนเซอร์โฟลว์:: ปฏิบัติการ:: เบาบางลดผลรวม
#include <sparse_ops.h>คำนวณผลรวมขององค์ประกอบในมิติของ SparseTensor
สรุป
Op นี้ใช้ SparseTensor และเป็นคู่ที่กระจัดกระจายกับ tf.reduce_sum() โดยเฉพาะอย่างยิ่ง Op นี้ยังส่งคืน Tensor ที่มีความหนาแน่นแทนที่จะเป็นแบบกระจัดกระจาย
ลด sp_input ตามขนาดที่กำหนดใน reduction_axes ยกเว้นในกรณีที่ keep_dims เป็นจริง อันดับของเมตริกซ์จะลดลง 1 สำหรับแต่ละรายการใน reduction_axes หาก keep_dims เป็นจริง มิติที่ลดลงจะถูกคงไว้โดยมีความยาว 1
หาก reduction_axes ไม่มีรายการ มิติข้อมูลทั้งหมดจะถูกลดขนาด และส่งคืนเทนเซอร์ที่มีองค์ประกอบเดียว นอกจากนี้ แกนอาจเป็นค่าลบ ซึ่งจะถูกตีความตามกฎการจัดทำดัชนีใน Python
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- input_indices: 2-D เมทริกซ์
N x Rพร้อมดัชนีของค่าที่ไม่ว่างเปล่าใน SparseTensor อาจไม่อยู่ในลำดับตามรูปแบบบัญญัติ - input_values: 1-D
Nค่าที่ไม่ว่างซึ่งสอดคล้องกับinput_indices - input_shape: 1-D รูปร่างของอินพุต SparseTensor
- ลดแกน: 1-D ความยาว- เวกเตอร์
Kที่มีแกนลด
แอ็ตทริบิวต์ทางเลือก (ดู Attrs ):
- keep_dims: หากเป็นจริง ให้คงขนาดที่ลดลงโดยมีความยาว 1
ผลตอบแทน:
ตัวสร้างและผู้ทำลาย | |
|---|---|
SparseReduceSum (const :: tensorflow::Scope & scope, :: tensorflow::Input input_indices, :: tensorflow::Input input_values, :: tensorflow::Input input_shape, :: tensorflow::Input reduction_axes) | |
SparseReduceSum (const :: tensorflow::Scope & scope, :: tensorflow::Input input_indices, :: tensorflow::Input input_values, :: tensorflow::Input input_shape, :: tensorflow::Input reduction_axes, const SparseReduceSum::Attrs & attrs) |
คุณลักษณะสาธารณะ | |
|---|---|
operation | |
output | |
งานสาธารณะ | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
ฟังก์ชันคงที่สาธารณะ | |
|---|---|
KeepDims (bool x) | |
โครงสร้าง | |
|---|---|
| เทนเซอร์โฟลว์ :: ops :: SparseReduceSum :: Attrs | ตัวตั้งค่าแอ็ตทริบิวต์ทางเลือกสำหรับ SparseReduceSum |
คุณลักษณะสาธารณะ
การดำเนินการ
Operation operation
เอาท์พุท
::tensorflow::Output output
งานสาธารณะ
เบาบางลดผลรวม
SparseReduceSum( const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape, ::tensorflow::Input reduction_axes )
เบาบางลดผลรวม
SparseReduceSum( const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape, ::tensorflow::Input reduction_axes, const SparseReduceSum::Attrs & attrs )
โหนด
::tensorflow::Node * node() const
ตัวดำเนินการ::tensorflow::อินพุต
operator::tensorflow::Input() const
ตัวดำเนินการ::tensorflow::เอาต์พุต
operator::tensorflow::Output() const
ฟังก์ชันคงที่สาธารณะ
KeepDims
Attrs KeepDims( bool x )