เทนเซอร์โฟลว์:: ปฏิบัติการ:: บินนับ

#include <math_ops.h>

นับจำนวนครั้งของแต่ละค่าในอาร์เรย์จำนวนเต็ม

สรุป

ส่งออกเวกเตอร์ที่มี size ความยาวและประเภท dtype เดียวกันกับ weights หาก weights ว่างเปล่า ดัชนี i จะเก็บจำนวนครั้งที่นับค่า i ใน arr หาก weights ไม่ว่างเปล่า ดัชนี i จะจัดเก็บผลรวมของค่าใน weights ไว้ที่แต่ละดัชนี โดยที่ค่าที่สอดคล้องกันใน arr คือ i

ค่า arr อยู่นอกช่วง [0, ขนาด) จะถูกละเว้น

ข้อโต้แย้ง:

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

ผลตอบแทน:

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

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

Bincount (const :: tensorflow::Scope & scope, :: tensorflow::Input arr, :: tensorflow::Input size, :: tensorflow::Input weights)

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

bins
operation

งานสาธารณะ

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

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

ถังขยะ

::tensorflow::Output bins

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

Operation operation

งานสาธารณะ

บินนับ

 Bincount(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input arr,
  ::tensorflow::Input size,
  ::tensorflow::Input weights
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const