टेंसरफ़्लो:: ऑप्स:: कम्प्रोड

#include <math_ops.h>

axis के अनुदिश टेंसर x के संचयी उत्पाद की गणना करें।

सारांश

डिफ़ॉल्ट रूप से, यह ऑप एक समावेशी कम्प्रोड निष्पादित करता है, जिसका अर्थ है कि इनपुट का पहला तत्व आउटपुट के पहले तत्व के समान है:

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

exclusive क्वार्ग को True पर सेट करके, इसके बजाय एक एक्सक्लूसिव कम्प्रोड निष्पादित किया जाता है:

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

reverse क्वार्ग को True पर सेट करके, कंप्रोड विपरीत दिशा में किया जाता है:

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

यह अलग-अलग tf.reverse ऑप्स का उपयोग करने से अधिक कुशल है।

reverse और exclusive क्वार्ग को भी जोड़ा जा सकता है:

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

तर्क:

  • स्कोप: एक स्कोप ऑब्जेक्ट
  • एक्स: एक Tensor । निम्न प्रकारों में से एक होना चाहिए: float32 , float64 , int64 , int32 , uint8 , uint16 , int16 , int8 , complex64 , complex128 , qint8 , quint8 , qint32 , half
  • अक्ष: int32 प्रकार का एक Tensor (डिफ़ॉल्ट: 0)। [-rank(x), rank(x)) सीमा में होना चाहिए।

वैकल्पिक विशेषताएँ (देखें Attrs ):

  • एक्सक्लूसिव: यदि True , तो एक्सक्लूसिव कंप्रोड निष्पादित करें।
  • रिवर्स: एक bool (डिफ़ॉल्ट: गलत)।

रिटर्न:

  • Output : आउट टेंसर.

निर्माता और विध्वंसक

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)

सार्वजनिक गुण

operation
out

सार्वजनिक समारोह

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

सार्वजनिक स्थैतिक कार्य

Exclusive (bool x)
Reverse (bool x)

संरचनाएँ

टेंसरफ्लो:: ऑप्स:: कम्प्रोड:: एटर्स

कम्प्रोड के लिए वैकल्पिक विशेषता सेटर्स।

सार्वजनिक गुण

संचालन

Operation operation

बाहर

::tensorflow::Output out

सार्वजनिक समारोह

कम्प्रोड

 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
)

नोड

::tensorflow::Node * node() const 

ऑपरेटर::टेन्सरफ़्लो::इनपुट

 operator::tensorflow::Input() const 

ऑपरेटर::टेन्सरफ़्लो::आउटपुट

 operator::tensorflow::Output() const 

सार्वजनिक स्थैतिक कार्य

अनन्य

Attrs Exclusive(
  bool x
)

रिवर्स

Attrs Reverse(
  bool x
)