tensorflow::ops::DenseBincount

#include <math_ops.h>

นับจำนวนครั้งที่แต่ละค่าปรากฏในอาร์เรย์จำนวนเต็ม

สรุป

ฟังก์ชันนี้จะส่งออกเวกเตอร์ที่มีความยาว size และมีชนิดข้อมูล (dtype) เดียวกันกับ weights ถ้า weights ว่างเปล่า ดัชนี i จะเก็บจำนวนครั้งที่ค่า i ปรากฏใน arr ถ้า weights ไม่ว่างเปล่า ดัชนี i จะเก็บผลรวมของค่าใน weights ที่แต่ละดัชนีซึ่งค่าที่สอดคล้องกันใน arr คือ i

ค่าใน arr ที่อยู่นอกช่วง [0, size) จะถูกละเว้น

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • อินพุต: Tensor จำนวนเต็ม 1 มิติ หรือ 2 มิติ
  • ขนาด: จำนวนเต็มที่ไม่ติดลบ สเกลาร์ Tensor
  • weights: เป็น Tensor int32, int64, float32 หรือ float64 ที่มีรูปร่างเหมือนกับ arr หรือ Tensor มีความยาวเป็น 0 ซึ่งในกรณีนี้จะถือว่าน้ำหนักทั้งหมดเท่ากับ 1

คุณลักษณะเสริม (ดูที่ Attrs ):

  • binary_output: bool; ระบุว่าเคอร์เนลควรนับจำนวนครั้งที่ปรากฏหรือจำนวนครั้งที่เกิดขึ้น

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

  • Output : Tensor 1 มิติที่มีความยาวเท่ากับ size หรือ Tensor 2 มิติที่มี [batch_size, size ] จำนวนนับหรือน้ำหนักรวมสำหรับแต่ละค่าในช่วง [0, size)

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

DenseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input size, :: tensorflow::Input weights)
DenseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input size, :: tensorflow::Input weights, const DenseBincount::Attrs & attrs)

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

operation
output

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

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

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

BinaryOutput (bool x)

โครงสร้าง

tensorflow::ops::DenseBincount::Attrs

ตัวเลือกในการตั้งค่าแอตทริบิวต์สำหรับ DenseBincount

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

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

Operation operation

เอาต์พุต

::tensorflow::Output output

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

เดนส์บินเคานต์

 DenseBincount(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input size,
  ::tensorflow::Input weights
)

เดนส์บินเคานต์

 DenseBincount(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input size,
  ::tensorflow::Input weights,
  const DenseBincount::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

เอาต์พุตไบนารี

Attrs BinaryOutput(
  bool x
)