tensorflow:: عملیات:: کامسام

#include <math_ops.h>

مجموع تجمعی تانسور x را در امتداد axis محاسبه کنید.

خلاصه

به طور پیش‌فرض، این عملیات یک جمع کل (cumsum) را انجام می‌دهد، به این معنی که اولین عنصر ورودی با اولین عنصر خروجی یکسان است:

tf.cumsum([a, b, c])  # => [a, a + b, a + b + c]

با تنظیم kwarg exclusive روی True ، یک cumsum انحصاری به جای آن انجام می‌شود:

tf.cumsum([a, b, c], exclusive=True)  # => [0, a, a + b]

با تنظیم reverse kwarg روی 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]

استدلال‌ها:

  • دامنه: یک شیء دامنه
  • 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 ، cumsum انحصاری را انجام دهید.
  • معکوس: یک bool (پیش‌فرض: غلط).

بازده:

  • Output : تانسور خروجی.

سازنده‌ها و مخرب‌ها

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:: عملیات:: کامسام:: جذابیت‌ها

تنظیم‌کننده‌های ویژگی اختیاری برای 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
)