tensorflow:: ops:: Cumsum

#include <math_ops.h>

axis বরাবর x টেনসরটির ক্রমযোজিত যোগফল নির্ণয় করুন।

সারসংক্ষেপ

ডিফল্টরূপে, এই অপারেশনটি একটি ইনক্লুসিভ কামসাম সম্পাদন করে, যার অর্থ হলো ইনপুটের প্রথম উপাদানটি আউটপুটের প্রথম উপাদানের অনুরূপ হয়:

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

exclusive kwarg-টিকে True সেট করলে, এর পরিবর্তে একটি exclusive cumsum সম্পাদিত হয়:

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

reverse kwarg-কে True সেট করলে, cumsum বিপরীত দিকে সম্পাদিত হয়:

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

এটি আলাদা tf.reverse অপস ব্যবহার করার চেয়ে বেশি কার্যকর।

reverse এবং exclusive kwargs গুলোকেও একত্রিত করা যেতে পারে:

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 ।
  • axis: int32 টাইপের একটি Tensor (ডিফল্ট: 0)। এর মান অবশ্যই [-rank(x), rank(x)) সীমার মধ্যে থাকতে হবে।

ঐচ্ছিক অ্যাট্রিবিউটসমূহ (দেখুন Attrs ):

  • একচেটিয়া: যদি True , তবে একচেটিয়া বীর্যপাত সম্পাদন করুন।
  • বিপরীত: একটি 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:: 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 

অপারেটর::টেনসরফ্লো::ইনপুট

 operator::tensorflow::Input() const 

অপারেটর::টেনসরফ্লো::আউটপুট

 operator::tensorflow::Output() const 

পাবলিক স্ট্যাটিক ফাংশন

একচেটিয়া

Attrs Exclusive(
  bool x
)

বিপরীত

Attrs Reverse(
  bool x
)