tensorflow::ops::Bincount
#include <math_ops.h>
Подсчитывает количество вхождений каждого значения в целочисленном массиве.
Краткое описание
Выводит вектор длиной size и того же типа данных, что и weights. Если weights пустые, то индекс i хранит количество раз, когда значение i подсчитывается в arr. Если weights не пустые, то индекс i хранит сумму значения в weights в каждом индексе, где соответствующее значение в arr равно i.
Значения в arr за пределами диапазона [0, size) игнорируются.
Аргументы:
- scope: Объект Scope
- arr: int32
Tensor. - size: скаляр int32 с неотрицательным значением
Tensor. - weights: int32, int64, float32 или float64
Tensorс такой же формой, как иarr, или длина-0Tensor, в этом случае все веса равны 1.
Возвращает:
-
Output: 1DTensorдлиной, равнойsize. Подсчеты или суммированные веса для каждого значения в диапазоне [0, size).
| Конструкторы и деструкторы | |
|---|---|
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 | |
Общедоступные атрибуты
bins
::tensorflow::Output bins
операция
Operation operation
Общедоступные функции
Bincount
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
© 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/bincount