tensorflow::ops::SparseSegmentMeanWithNumSegments

#include <math_ops.h>

คำนวณค่าเฉลี่ยตามส่วนย่อยที่เบาบางของเทนเซอร์

สรุป

คล้ายกับ SparseSegmentMean แต่ยอมให้มีค่า id ใน segment_ids หายไปได้ หากค่า id หายไป เทนเซอร์ output ในตำแหน่งนั้นจะมีค่าเป็นศูนย์

โปรดอ่าน หัวข้อเกี่ยวกับการแบ่งกลุ่ม เพื่อดูคำอธิบายเกี่ยวกับกลุ่มต่างๆ

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • ดัชนี: เทนเซอร์ 1 มิติ มีลำดับชั้นเดียวกับ segment_ids
  • segment_ids: เทนเซอร์ 1 มิติ ค่าต่างๆ ควรเรียงลำดับและสามารถซ้ำกันได้
  • num_segments: ควรเท่ากับจำนวนรหัสเซ็กเมนต์ที่ไม่ซ้ำกัน

การส่งคืนสินค้า:

  • Output : มีรูปร่างเหมือนกับข้อมูล ยกเว้นมิติที่ 0 ซึ่งมีขนาดเท่ากับจำนวน num_segments )

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

SparseSegmentMeanWithNumSegments (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input indices, :: tensorflow::Input segment_ids, :: tensorflow::Input num_segments)

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

operation
output

หน้าที่สาธารณะ

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

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

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

Operation operation

เอาต์พุต

::tensorflow::Output output

หน้าที่สาธารณะ

ค่าเฉลี่ยของเซ็กเมนต์แบบเบาบางพร้อมจำนวนเซ็กเมนต์

 SparseSegmentMeanWithNumSegments(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input data,
  ::tensorflow::Input indices,
  ::tensorflow::Input segment_ids,
  ::tensorflow::Input num_segments
)

โหนด

::tensorflow::Node * node() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต

 operator::tensorflow::Output() const