tensorflow:: ops:: Cumprod
#include <math_ops.h> חשב את המכפלה המצטברת של הטנזור x לאורך axis .
תַקצִיר
כברירת מחדל, פעולה זו מבצעת cumprod inclusive, מה שאומר שהאלמנט הראשון של הקלט זהה לאלמנט הראשון של הפלט:
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 kwarg ל- True , ה- cumprod מתבצע בכיוון ההפוך:
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, בצע 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) |
מאפיינים ציבוריים | |
|---|---|
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
אופרטור::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
פונקציות סטטיות ציבוריות
בִּלעָדִי
Attrs Exclusive( bool x )
לַהֲפוֹך
Attrs Reverse( bool x )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2026-11-05 (שעון UTC).