เทนเซอร์โฟลว์:: ปฏิบัติการ:: เบาบางหนาแน่นCwiseเพิ่ม

#include <sparse_ops.h>

เพิ่ม SparseTensor และ Tensor แบบหนาแน่น โดยใช้กฎพิเศษเหล่านี้:

สรุป

(1) ออกอากาศด้านหนาแน่นให้มีรูปร่างเหมือนกับด้านเบาบาง หากเข้าเกณฑ์ (2) จากนั้น เฉพาะค่าความหนาแน่นที่ชี้โดยดัชนีของ SparseTensor เท่านั้นที่มีส่วนร่วมในการบวกแบบ cwise

ตามกฎเหล่านี้ ผลลัพธ์ที่ได้คือ SparseTensor แบบลอจิคัลที่มีดัชนีและรูปร่างเหมือนกันทุกประการ แต่อาจมีค่าที่ไม่ใช่ศูนย์ต่างกัน ผลลัพธ์ของ Op นี้คือผลลัพธ์ที่ไม่ใช่ค่าศูนย์

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • sp_indices: 2-D เมทริกซ์ N x R พร้อมดัชนีของค่าที่ไม่ว่างเปล่าใน SparseTensor อาจไม่อยู่ในลำดับตามรูปแบบบัญญัติ
  • sp_values: 1-D N ค่าที่ไม่ว่างซึ่งสอดคล้องกับ sp_indices
  • sp_shape: 1-D รูปร่างของอินพุต SparseTensor
  • หนาแน่น: R -D ตัวถูกดำเนินการ เทนเซอร์ หนาแน่น

ผลตอบแทน:

  • Output : 1-D ค่า N ที่ดำเนินการอยู่

ตัวสร้างและผู้ทำลาย

SparseDenseCwiseAdd (const :: tensorflow::Scope & scope, :: tensorflow::Input sp_indices, :: tensorflow::Input sp_values, :: tensorflow::Input sp_shape, :: tensorflow::Input dense)

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

operation
output

งานสาธารณะ

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

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

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

Operation operation

เอาท์พุท

::tensorflow::Output output

งานสาธารณะ

เบาบางหนาแน่นCwiseเพิ่ม

 SparseDenseCwiseAdd(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input sp_indices,
  ::tensorflow::Input sp_values,
  ::tensorflow::Input sp_shape,
  ::tensorflow::Input dense
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const