เทนเซอร์โฟลว์:: ปฏิบัติการ:: บินนับ
#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) |
คุณลักษณะสาธารณะ | |
|---|---|
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