tensorflow::ops::SparseBincount
#include <math_ops.h>Đếm số lần xuất hiện của mỗi giá trị trong một mảng số nguyên.
Bản tóm tắt
Hàm trả về một vectơ có độ dài size và cùng kiểu dữ liệu với weights . Nếu weights rỗng, thì chỉ số i lưu trữ số lần giá trị i xuất hiện trong arr . Nếu weights không rỗng, thì chỉ số i lưu trữ tổng của các giá trị trong weights tại mỗi chỉ số mà giá trị tương ứng trong arr là i .
Các giá trị trong mảng arr nằm ngoài phạm vi [0, size) sẽ bị bỏ qua.
Luận điểm:
- phạm vi: Một đối tượng Phạm vi
- chỉ số:
Tensor2D int64. - giá trị:
Tensorsố nguyên 1 chiều. - dense_shape:
Tensor1D int64. - kích thước:
Tensorvô hướng số nguyên không âm. - weights: là một
Tensorint32, int64, float32 hoặc float64 có cùng hình dạng vớiinput, hoặc mộtTensorcó độ dài bằng 0, trong trường hợp đó nó hoạt động như tất cả các trọng số bằng 1.
Các thuộc tính tùy chọn (xem Attrs ):
- binary_output: bool; Cho biết nhân hệ điều hành nên đếm số lần xuất hiện hay số lần xảy ra.
Trả về:
-
Output:Tensor1D có độ dài bằngsizehoặcTensor2D với [batch_size,size]. Số lượng hoặc tổng trọng số cho mỗi giá trị trong phạm vi [0, size).
Hàm khởi tạo và hàm hủy | |
|---|---|
SparseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input indices, :: tensorflow::Input values, :: tensorflow::Input dense_shape, :: tensorflow::Input size, :: tensorflow::Input weights) | |
SparseBincount (const :: tensorflow::Scope & scope, :: tensorflow::Input indices, :: tensorflow::Input values, :: tensorflow::Input dense_shape, :: tensorflow::Input size, :: tensorflow::Input weights, const SparseBincount::Attrs & attrs) |
Thuộc tính công khai | |
|---|---|
operation | |
output | |
Chức năng công cộng | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Các hàm tĩnh công khai | |
|---|---|
BinaryOutput (bool x) | |
Cấu trúc | |
|---|---|
| tensorflow::ops::SparseBincount::Attrs | Các thiết lập thuộc tính tùy chọn cho SparseBincount . |
Thuộc tính công khai
hoạt động
Operation operation
đầu ra
::tensorflow::Output output
Chức năng công cộng
SparseBincount
SparseBincount( const ::tensorflow::Scope & scope, ::tensorflow::Input indices, ::tensorflow::Input values, ::tensorflow::Input dense_shape, ::tensorflow::Input size, ::tensorflow::Input weights )
SparseBincount
SparseBincount( const ::tensorflow::Scope & scope, ::tensorflow::Input indices, ::tensorflow::Input values, ::tensorflow::Input dense_shape, ::tensorflow::Input size, ::tensorflow::Input weights, const SparseBincount::Attrs & attrs )
nút
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Các hàm tĩnh công khai
Đầu ra nhị phân
Attrs BinaryOutput( bool x )