tensorflow:: אופס:: קמפרוד
#include <math_ops.h>
חשב את המכפלה המצטברת של הטנזור x
לאורך axis
.
תַקצִיר
כברירת מחדל, אופציה זו מבצעת cumprod כולל, כלומר האלמנט הראשון של הקלט זהה לאלמנט הראשון של הפלט:
tf.cumprod([a, b, c]) # => [a, a * b, a * b * c]
על ידי הגדרת ה-kwarg exclusive
ל- True
, במקום זאת מתבצעת cumprod בלעדי:
tf.cumprod([a, b, c], exclusive=True) # => [1, a, a * b]
על ידי הגדרת הקווארג reverse
ל- True
, ה-cumprod מבוצע בכיוון ההפוך:
tf.cumprod([a, b, c], reverse=True) # => [a * b * c, b * c, c]
זה יעיל יותר משימוש ב- tf.reverse
ops נפרד.
ניתן לשלב גם את הקווארגים reverse
exclusive
:
tf.cumprod([a, b, c], exclusive=True, reverse=True) # => [b * c, c, 1]
טיעונים:
- scope: אובייקט Scope
- 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
, בצע קמפורד בלעדי. - הפוך: A
bool
(ברירת מחדל: False).
החזרות:
-
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 )