flux tensoriel : : opérations : : DiagPart
#include <array_ops.h>Renvoie la partie diagonale du tenseur.
Résumé
Cette opération renvoie un tenseur avec la partie diagonal de l' input . La partie diagonal est calculée comme suit :
Supposons que input ait des dimensions [D1,..., Dk, D1,..., Dk] , alors la sortie est un tenseur de rang k avec des 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 :
- scope : 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