tensorflow::ops::Bincount
#include <math_ops.h>นับจำนวนครั้งที่แต่ละค่าปรากฏในอาร์เรย์จำนวนเต็ม
สรุป
ฟังก์ชันนี้จะส่งออกเวกเตอร์ที่มีความยาว size และมีชนิดข้อมูล (dtype) เดียวกันกับ weights ถ้า weights ว่างเปล่า ดัชนี i จะเก็บจำนวนครั้งที่ค่า i ปรากฏใน arr ถ้า weights ไม่ว่างเปล่า ดัชนี i จะเก็บผลรวมของค่าใน weights ที่แต่ละดัชนีซึ่งค่าที่สอดคล้องกันใน arr คือ i
ค่าใน arr ที่อยู่นอกช่วง [0, size) จะถูกละเว้น
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- arr: int32
Tensor. - ขนาด:
Tensorสเกลาร์จำนวนเต็ม 32 ที่ไม่ติดลบ - weights: เป็น
Tensorint32, int64, float32 หรือ float64 ที่มีรูปร่างเหมือนกับarrหรือTensorมีความยาวเป็น 0 ซึ่งในกรณีนี้จะถือว่าน้ำหนักทั้งหมดเท่ากับ 1
การส่งคืนสินค้า:
ตัวสร้างและตัวทำลาย | |
|---|---|
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
ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต
operator::tensorflow::Input() const
ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต
operator::tensorflow::Output() const