tensorflow::ops::SparseBincount
#include <math_ops.h>Подсчитывает количество вхождений каждого значения в целочисленном массиве.
Краткое содержание
Выводит вектор длиной size и тем же типом данных, что и weights . Если weights пуст, то индекс i хранит количество раз, когда значение i было подсчитано в arr . Если weights непуст, то индекс i хранит сумму значений в weights для каждого индекса, где соответствующее значение в arr равно i .
Значения в arr выходящие за пределы диапазона [0, size), игнорируются.
Аргументы:
- scope: Объект Scope
- индексы: 2D int64
Tensor. - значения: 1D целочисленный
Tensor. - dense_shape: 1D int64
Tensor. - размер: неотрицательный целочисленный скалярный
Tensor. - weights: это
Tensorint32, int64, float32 или float64 с той же формой, что иinput, илиTensorнулевой длины, в этом случае он действует как тензор, в котором все веса равны 1.
Дополнительные атрибуты (см. Attrs ):
- binary_output: bool; Следует ли ядру подсчитывать количество появлений или число вхождений.
Возвращает:
-
Output: одномерныйTensorдлиной, равнойsize, или двумерныйTensorразмером [batch_size,size]. Количество или сумма весов для каждого значения в диапазоне [0, size).
Конструкторы и Деструкторы | |
|---|---|
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) |
Общедоступные атрибуты | |
|---|---|
operation | |
output | |
Общественные функции | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Открытые статические функции | |
|---|---|
BinaryOutput (bool x) | |
Структуры | |
|---|---|
| tensorflow::ops::SparseBincount::Attrs | Дополнительные параметры установки атрибутов для SparseBincount . |
Общедоступные атрибуты
операция
Operation operation
выход
::tensorflow::Output output
Общественные функции
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 )
узел
::tensorflow::Node * node() const
оператор::tensorflow::Input
operator::tensorflow::Input() const
оператор::tensorflow::Output
operator::tensorflow::Output() const
Открытые статические функции
BinaryOutput
Attrs BinaryOutput( bool x )