جریان تنسور:: عملیات:: کامپرود

#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 جداگانه است.

کوارگ های 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 ، 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
)