flux tensoriel : : opérations : : Cumprod
#include <math_ops.h> Calculez le produit cumulé du tenseur x le long de axis .
Résumé
Par défaut, cette opération effectue un cumprod inclusif, ce qui signifie que le premier élément de l'entrée est identique au premier élément de la sortie :
tf.cumprod([a, b, c]) # => [a, a * b, a * b * c] En définissant le kwarg exclusive sur True , un cumprod exclusif est effectué à la place :
tf.cumprod([a, b, c], exclusive=True) # => [1, a, a * b]
En définissant le reverse kwarg sur True , le cumprod est effectué dans le sens opposé :
tf.cumprod([a, b, c], reverse=True) # => [a * b * c, b * c, c] C'est plus efficace que d'utiliser des opérations tf.reverse distinctes.
Les kwargs reverse et exclusive peuvent également être combinés :
tf.cumprod([a, b, c], exclusive=True, reverse=True) # => [b * c, c, 1]
Arguments :
- scope : un objet Scope
- x : un
Tensor. Doit être l'un des types suivants :float32,float64,int64,int32,uint8,uint16,int16,int8,complex64,complex128,qint8,quint8,qint32,half. - axis : Un
Tensorde typeint32(par défaut : 0). Doit être compris entre[-rank(x), rank(x)).
Attributs facultatifs (voir Attrs ) :
- exclusif : si
True, exécutez cumprod exclusif. - reverse : un
bool(par défaut : False).
Retours :
-
Output: Le tenseur de sortie.
Constructeurs et Destructeurs | |
|---|---|
Cumprod (const :: tensorflow::Scope & scope, :: tensorflow::Input x, :: tensorflow::Input axis) | |
Cumprod (const :: tensorflow::Scope & scope, :: tensorflow::Input x, :: tensorflow::Input axis, const Cumprod::Attrs & attrs) |
Attributs publics | |
|---|---|
operation | |
out | |
Fonctions publiques | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Fonctions statiques publiques | |
|---|---|
Exclusive (bool x) | |
Reverse (bool x) | |
Structures | |
|---|---|
| tensorflow :: ops :: Cumprod :: Attrs | Setters d'attributs facultatifs pour Cumprod . |
Attributs publics
opération
Operation operation
dehors
::tensorflow::Output out
Fonctions publiques
Cumprod
Cumprod( const ::tensorflow::Scope & scope, ::tensorflow::Input x, ::tensorflow::Input axis )
Cumprod
Cumprod( const ::tensorflow::Scope & scope, ::tensorflow::Input x, ::tensorflow::Input axis, const Cumprod::Attrs & attrs )
nœud
::tensorflow::Node * node() const
opérateur :: tensorflow :: Entrée
operator::tensorflow::Input() const
opérateur :: tensorflow :: Sortie
operator::tensorflow::Output() const
Fonctions statiques publiques
Exclusif
Attrs Exclusive( bool x )
Inverse
Attrs Reverse( bool x )