تدفق التوتر:: العمليات:: كمبرود
#include <math_ops.h>
حساب المنتج التراكمي للموتر x
على طول axis
.
ملخص
افتراضيًا، تنفذ هذه العملية عملية cuprod شاملة، مما يعني أن العنصر الأول من الإدخال مطابق للعنصر الأول من الإخراج:
tf.cumprod([a, b, c]) # => [a, a * b, a * b * c]
من خلال تعيين kwarg exclusive
على True
، يتم تنفيذ cuprod الحصري بدلاً من ذلك:
tf.cumprod([a, b, c], exclusive=True) # => [1, a, a * b]
من خلال ضبط reverse
kwarg على True
، يتم تنفيذ cumprod في الاتجاه المعاكس:
tf.cumprod([a, b, c], reverse=True) # => [a * b * c, b * c, c]
يعد هذا أكثر كفاءة من استخدام عمليات tf.reverse
المنفصلة.
يمكن أيضًا الجمع بين kwargs 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
. - المحور:
Tensor
من النوعint32
(الافتراضي: 0). يجب أن يكون في النطاق[-rank(x), rank(x))
.
السمات الاختيارية (انظر Attrs
):
- حصريًا: إذا كان
True
، فقم بإجراء cumprod الحصري. - العكس:
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) |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
الهياكل | |
---|---|
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 )