Spec-Zone.ru › TensorFlow C++ 2.3

tensorflow::ops::SparseReduceSum

#include <sparse_ops.h>

Вычисляет сумму элементов по измерениям SparseTensor.

Summary

Этот оператор принимает SparseTensor и является разреженным аналогом tf.reduce_sum(). В частности, этот оператор также возвращает плотную Tensor вместо разреженной.

Сводит sp_input по измерениям, указанным в reduction_axes. Если keep_dims не равно true, ранг тензора уменьшается на 1 для каждой записи в reduction_axes. Если keep_dims равно true, уменьшенные измерения сохраняются с длиной 1.

Если reduction_axes не содержит записей, все измерения сводятся, и возвращается тензор с одним элементом. Кроме того, оси могут быть отрицательными, которые интерпретируются в соответствии с правилами индексирования в Python.

Аргументы:

  • scope: Объект Scope
  • input_indices: 2-мерная. Матрица N x R с индексами ненулевых значений в SparseTensor, возможно, не в каноническом порядке.
  • input_values: 1-мерная. N ненулевых значений, соответствующих input_indices.
  • input_shape: 1-мерная. Форма входного SparseTensor.
  • reduction_axes: 1-мерная. Вектор длиной K, содержащий оси сводки.

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

  • keep_dims: Если true, сохранять уменьшенные измерения с длиной 1.

Возвращает:

  • Output: R-K-мерный. Сводный Tensor.
Конструкторы и деструкторы
SparseReduceSum(const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape, ::tensorflow::Input reduction_axes)
SparseReduceSum(const ::tensorflow::Scope & scope, ::tensorflow::Input input_indices, ::tensorflow::Input input_values, ::tensorflow::Input input_shape, ::tensorflow::Input reduction_axes, const SparseReduceSum::Attrs & attrs)
Публичные атрибуты
operation
Operation
output
::tensorflow::Output
Публичные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Публичные статические функции
KeepDims(bool x)
Attrs
Структуры
tensorflow::ops::SparseReduceSum::Attrs

Необязательные установщики атрибутов для SparseReduceSum.

Публичные атрибуты

operation

Operation operation

output

::tensorflow::Output output

Публичные функции

SparseReduceSum

 SparseReduceSum(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input_indices,
  ::tensorflow::Input input_values,
  ::tensorflow::Input input_shape,
  ::tensorflow::Input reduction_axes
)

SparseReduceSum

 SparseReduceSum(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input_indices,
  ::tensorflow::Input input_values,
  ::tensorflow::Input input_shape,
  ::tensorflow::Input reduction_axes,
  const SparseReduceSum::Attrs & attrs
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

Публичные статические функции

KeepDims

Attrs KeepDims(
  bool x
)

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/sparse-reduce-sum

Spec-Zone.ru

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