tensorflow::ops::DiagPart
#include <array_ops.h>
Возвращает диагональную часть тензора.
Summary
Данная операция возвращает тензор с диагональной частью input. Диагональная часть вычисляется следующим образом:
Предположим, что 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 | |
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
© 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/diag-part