Spec-Zone.ru › TensorFlow C++ 2.9

tensorflow::ops::DenseBincount

#include <math_ops.h>

Подсчитывает количество вхождений каждого значения в целочисленном массиве.

Краткое описание

Выводит вектор длиной size и того же типа данных, что и weights. Если weights пустые, то индекс i хранит количество раз, которое значение i встречается в arr. Если weights не пустые, то индекс i хранит сумму значений из weights по всем индексам, где соответствующее значение в arr равно i.

Значения в arr вне диапазона [0, size) игнорируются.

Args:

  • scope: Объект Scope
  • input: Целочисленный массив 1D или 2D Tensor.
  • size: Неотрицательное целочисленное скалярное значение Tensor.
  • weights: целочисленный 32 или 64 бита, или с плавающей точкой 32 или 64 бита Tensor с той же формой, что и arr, или пустой массив Tensor, в этом случае все веса равны 1.

Дополнительные атрибуты (см. Attrs):

  • binary_output: bool; Нужно ли считать количество вхождений или выводить количество совпадений.

Returns:

  • Output: 1D Tensor длиной, равной size или 2D Tensor с формой [batch_size, size]. Количество или суммарные веса для каждого значения в диапазоне [0, size).
Конструкторы и деструкторы
DenseBincount(const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input size, ::tensorflow::Input weights)
DenseBincount(const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input size, ::tensorflow::Input weights, const DenseBincount::Attrs & attrs)
Общедоступные атрибуты
operation
Operation
output
::tensorflow::Output
Общедоступные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Общедоступные статические функции
BinaryOutput(bool x)
Attrs
Структуры
tensorflow::ops::DenseBincount::Attrs

Дополнительные параметры для DenseBincount.

Общедоступные атрибуты

operation

Operation operation

output

::tensorflow::Output output

Общедоступные функции

DenseBincount

 DenseBincount(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input size,
  ::tensorflow::Input weights
)

DenseBincount

 DenseBincount(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input size,
  ::tensorflow::Input weights,
  const DenseBincount::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
)

© 2022 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.9/api_docs/cc/class/tensorflow/ops/dense-bincount

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API