tensorflow::ops::DiagPart
#include <array_ops.h>Renvoie la partie diagonale du tenseur.
Résumé
Cette opération renvoie un tenseur contenant la partie diagonal de l' input . La partie diagonal est calculée comme suit :
Si input a les dimensions [D1,..., Dk, D1,..., Dk] , alors la sortie est un tenseur de rang k avec les dimensions [D1,..., Dk] où :
diagonal[i1,..., ik] = input[i1, ..., ik, i1,..., ik] .
Par exemple:
# '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]
Arguments :
- portée : un objet Scope
- entrée : tenseur de rang k où k est pair et non nul.
Retours :
-
Output: La diagonale extraite.
Constructeurs et destructeurs | |
|---|---|
DiagPart (const :: tensorflow::Scope & scope, :: tensorflow::Input input) |
attributs publics | |
|---|---|
diagonal | |
operation | |
fonctions publiques | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
attributs publics
diagonale
::tensorflow::Output diagonal
opération
Operation operation
fonctions publiques
DiagPart
DiagPart( const ::tensorflow::Scope & scope, ::tensorflow::Input input )
nœud
::tensorflow::Node * node() const
opérateur::tensorflow::Entrée
operator::tensorflow::Input() const
opérateur::tensorflow::Sortie
operator::tensorflow::Output() const