tensorflow:: ops:: Cumprod

#include <math_ops.h>

Calcola il prodotto cumulativo del tensore x lungo axis .

Riepilogo

Per impostazione predefinita, questa operazione esegue un cumprod inclusivo, il che significa che il primo elemento dell'input è identico al primo elemento dell'output:

tf.cumprod([a, b, c])  # => [a, a * b, a * b * c]

Impostando l'argomento exclusive su True , viene invece eseguita un'operazione cumprod esclusiva:

tf.cumprod([a, b, c], exclusive=True)  # => [1, a, a * b]

Impostando il parametro reverse su True , l'operazione `cumprod` viene eseguita nella direzione opposta:

tf.cumprod([a, b, c], reverse=True)  # => [a * b * c, b * c, c]

Questo è più efficiente rispetto all'utilizzo di operazioni tf.reverse separate.

È possibile combinare anche gli argomenti reverse ed exclusive :

tf.cumprod([a, b, c], exclusive=True, reverse=True)  # => [b * c, c, 1]

Argomentazioni:

  • ambito: un oggetto Scope
  • x: Un Tensor . Deve essere uno dei seguenti tipi: float32 , float64 , int64 , int32 , uint8 , uint16 , int16 , int8 , complex64 , complex128 , qint8 , quint8 , qint32 , half .
  • asse: un Tensor di tipo int32 (predefinito: 0). Deve essere nell'intervallo [-rank(x), rank(x)) .

Attributi opzionali (vedere Attrs ):

  • esclusivo: se True , esegui cumprod esclusivo.
  • reverse: un bool (predefinito: False).

Resi:

  • Output : Il tensore di output.

Costruttori e distruttori

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)

attributi pubblici

operation
out

Funzioni pubbliche

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

Funzioni statiche pubbliche

Exclusive (bool x)
Reverse (bool x)

Strutture

tensorflow:: ops:: Cumprod:: Attrs

Impostazioni opzionali degli attributi per Cumprod .

attributi pubblici

operazione

Operation operation

fuori

::tensorflow::Output out

Funzioni pubbliche

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
)

nodo

::tensorflow::Node * node() const 

operatore::tensorflow::Input

 operator::tensorflow::Input() const 

operatore::tensoreflusso::output

 operator::tensorflow::Output() const 

Funzioni statiche pubbliche

Esclusivo

Attrs Exclusive(
  bool x
)

Inversione

Attrs Reverse(
  bool x
)