tensorflow :: ops :: کامسوم
#include <math_ops.h>
مجموع تجمعی کشش x
در امتداد axis
.
خلاصه
به طور پیش فرض ، این عملیات یک جمع جمع را انجام می دهد ، به این معنی که اولین عنصر ورودی با اولین عنصر خروجی یکسان است:
tf.cumsum([a, b, c]) # => [a, a + b, a + b + c]
با تنظیم kwarg exclusive
روی True
، به جای آن یک جمع تجمعی انجام می شود:
tf.cumsum([a, b, c], exclusive=True) # => [0, a, a + b]
با تنظیم kwarg reverse
روی True
، جمع در جهت مخالف انجام می شود:
tf.cumsum([a, b, c], reverse=True) # => [a + b + c, b + c, c]
این کارایی بیشتری نسبت به استفاده از گزینه های جداگانه tf.reverse
.
کوارگهای reverse
و exclusive
نیز می توانند ترکیب شوند:
tf.cumsum([a, b, c], exclusive=True, reverse=True) # => [b + c, c, 0]
استدلال ها:
- دامنه: یک شی Sc Scope
- x: یک
Tensor
. : باید یکی از انواع زیر باشدfloat32
،float64
،int64
،int32
،uint8
،uint16
،int16
،int8
،complex64
،complex128
،qint8
،quint8
،qint32
،half
. - axis:
Tensor
از نوعint32
(پیش فرض: 0). باید در محدوده[-rank(x), rank(x))
باشد.
ویژگی های اختیاری (به Attrs
مراجعه کنید):
- انحصاری: اگر
True
، جمع انحصاری را انجام دهید. - معکوس:
bool
(پیش فرض: غلط).
بازده:
سازندگان و ویرانگران | |
---|---|
Cumsum (const :: tensorflow::Scope & scope, :: tensorflow::Input x, :: tensorflow::Input axis) | |
Cumsum (const :: tensorflow::Scope & scope, :: tensorflow::Input x, :: tensorflow::Input axis, const Cumsum::Attrs & attrs) |
صفات عمومی | |
---|---|
operation | |
out |
کارکردهای عمومی | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
توابع استاتیک عمومی | |
---|---|
Exclusive (bool x) | |
Reverse (bool x) |
سازه ها | |
---|---|
tensorflow :: ops :: Cumsum :: Attrs | تنظیم کننده های ویژگی اختیاری برایCumsum . |
صفات عمومی
عمل
Operation operation
بیرون
::tensorflow::Output out
کارکردهای عمومی
کامسوم
Cumsum( const ::tensorflow::Scope & scope, ::tensorflow::Input x, ::tensorflow::Input axis )
کامسوم
Cumsum( const ::tensorflow::Scope & scope, ::tensorflow::Input x, ::tensorflow::Input axis, const Cumsum::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 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2020-04-20 بهوقت ساعت هماهنگ جهانی.