Spec-Zone.ru › TensorFlow C++

tensorflow::ops::DiagPart

#include <array_ops.h>

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

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

Эта операция возвращает тензор с диагональной частью тензора.

Диагональная часть вычисляется следующим образом:

Предположим, что 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