Spec-Zone.ru › TensorFlow C++

tensorflow::ops::RaggedBincount

#include <math_ops.h>

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

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

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

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

Аргументы:

  • scope: объект Scope
  • splits: одномерный Tensor типа int64.
  • values: двумерный Tensor типа int.
  • size: скалярный Tensor типа int, неотрицательный.
  • weights: Tensor типа int32, int64, float32 или float64 с той же формой, что и input, либо Tensor нулевой длины; в последнем случае всем весам присваивается значение 1.

Необязательные атрибуты (см. Attrs):

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

Возвращает:

  • Output: одномерный Tensor длиной, равной size, либо двумерный Tensor с формой [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
Operation
output
::tensorflow::Output
Открытые функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Открытые статические функции
BinaryOutput(bool x)
Attrs
Структуры
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
)

© 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/api_docs/cc/class/tensorflow/ops/ragged-bincount

Spec-Zone.ru

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