เทนเซอร์โฟลว์:: ปฏิบัติการ:: บินนับ
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
#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-0Tensor
ซึ่งในกรณีนี้จะทำหน้าที่เป็นน้ำหนักทั้งหมดเท่ากับ 1
ผลตอบแทน:
ตัวสร้างและผู้ทำลาย | |
---|---|
Bincount (const :: tensorflow::Scope & scope, :: tensorflow::Input arr, :: tensorflow::Input size, :: tensorflow::Input weights) |
งานสาธารณะ | |
---|---|
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