Spec-Zone.ru › TensorFlow C++

tensorflow::ops::DiagPart

#include <array_ops.h>

Возвращает диагональную часть тензора.

Сводка

Эта операция возвращает тензор с diagonal частью input. diagonal часть вычисляется следующим образом:

Предположим, что input имеет размерности [D1,..., Dk, D1,..., Dk], тогда выходные данные — тензор ранга k с размерностями [D1,..., Dk], где:

diagonal[i1,..., ik] = input[i1, ..., ik, i1,..., ik].

Например:

# 'input' is [[1, 0, 0, 0]
              [0, 2, 0, 0]
              [0, 0, 3, 0]
              [0, 0, 0, 4]]
tf.diag_part(input) ==> [1, 2, 3, 4]

Аргументы:

  • scope: объект Scope
  • input: тензор ранга k, где k — чётное и ненулевое число.

Возвращает:

  • Output: извлечённая диагональ.
Конструкторы и деструкторы
DiagPart(const ::tensorflow::Scope & scope, ::tensorflow::Input input)
Открытые атрибуты
diagonal
::tensorflow::Output
operation
Operation
Открытые функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const

Открытые атрибуты

diagonal

::tensorflow::Output diagonal

operation

Operation operation

Открытые функции

DiagPart

 DiagPart(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

© 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/diag-part

Spec-Zone.ru

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