tensorflow::ops::RaggedBincount
#include <math_ops.h>
Считает количество вхождений каждого значения в целочисленном массиве.
Summary
Выводит вектор длиной size и того же типа данных, что и weights. Если weights пустые, то индекс i хранит количество раз, которое значение i встречается в arr. Если weights не пустые, то индекс i хранит сумму значений в weights в каждом индексе, где соответствующее значение в arr равно i.
Значения в arr за пределами диапазона [0, size) игнорируются.
Аргументы:
- scope: Объект Scope
- splits: 1D int64
Tensor. - values: 2D int
Tensor. - size: скаляр неотрицательного целого типа
Tensor. - weights: это int32, int64, float32 или float64
Tensorс той же формой, что иinput, или длина-0Tensor, в этом случае это эквивалентно всем весам, равным 1.
Необязательные атрибуты (см. Attrs):
- binary_output: bool; Указывает, должен ли ядро считать появление или количество вхождений.
Возвращает:
-
Output: 1DTensorс длиной, равнойsizeили 2DTensorс [batch_size,size]. Количество или суммированные веса для каждого значения в диапазоне [0, size).
| Конструкторы и деструкторы | |
|---|---|
RaggedBincount(const ::tensorflow::Scope & scope, ::tensorflow::Input splits, ::tensorflow::Input values, ::tensorflow::Input size, ::tensorflow::Input weights) | |
RaggedBincount(const ::tensorflow::Scope & scope, ::tensorflow::Input splits, ::tensorflow::Input values, ::tensorflow::Input size, ::tensorflow::Input weights, const RaggedBincount::Attrs & attrs) |
| Общественные атрибуты | |
|---|---|
operation | |
output | |
| Общественные функции | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
| Общественные статические функции | |
|---|---|
BinaryOutput(bool x) | |
| Структуры | |
|---|---|
| tensorflow::ops::RaggedBincount::Attrs | Необязательные атрибуты-установщики для RaggedBincount. |
Общественные атрибуты
operation
Operation operation
output
::tensorflow::Output output
Общественные функции
RaggedBincount
RaggedBincount( const ::tensorflow::Scope & scope, ::tensorflow::Input splits, ::tensorflow::Input values, ::tensorflow::Input size, ::tensorflow::Input weights )
RaggedBincount
RaggedBincount( const ::tensorflow::Scope & scope, ::tensorflow::Input splits, ::tensorflow::Input values, ::tensorflow::Input size, ::tensorflow::Input weights, const RaggedBincount::Attrs & attrs )
node
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Общественные статические функции
BinaryOutput
Attrs BinaryOutput( bool x )
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/cc/class/tensorflow/ops/ragged-bincount