tensorflow:: ops:: Cumprod

#include <math_ops.h>

احسب حاصل الضرب التراكمي للموتر x على طول axis .

ملخص

بشكل افتراضي، تقوم هذه العملية بتنفيذ عملية إنتاج شاملة، مما يعني أن العنصر الأول من المدخلات مطابق للعنصر الأول من المخرجات:

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]

الحجج:

  • النطاق: كائن النطاق
  • x: Tensor . يجب أن يكون أحد الأنواع التالية: float32 ، float64 ، int64 ، int32 ، uint8 ، uint16 ، int16 ، int8 ، complex64 ، complex128 ، qint8 ، quint8 ، qint32 ، half .
  • المحور: Tensor من النوع int32 (الافتراضي: 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)

الهياكل

tensorflow:: ops:: Cumprod:: Attrs

أدوات تعيين السمات الاختيارية لـ Cumprod .

السمات العامة

عملية

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

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

الدوال الثابتة العامة

حصري

Attrs Exclusive(
  bool x
)

يعكس

Attrs Reverse(
  bool x
)