tensorflow:: ops:: SparseSegmentSumWithNumSegments
#include <math_ops.h>একটি টেনসরের স্পার্স সেগমেন্ট বরাবর যোগফল গণনা করে।
সারসংক্ষেপ
SparseSegmentSum মতোই, কিন্তু এটি segment_ids এ অনুপস্থিত আইডি অনুমোদন করে। যদি কোনো আইডি অনুপস্থিত থাকে, তাহলে সেই অবস্থানে output টেনসরটি শূন্য হয়ে যাবে।
সেগমেন্ট সম্পর্কে ব্যাখ্যার জন্য সেগমেন্টেশন সম্পর্কিত অধ্যায়টি পড়ুন।
উদাহরণস্বরূপ:
c = tf.constant([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]])
tf.sparse_segment_sum_with_num_segments( c, tf.constant([0, 1]), tf.constant([0, 0]), num_segments=3) # => [[0 0 0 0] # [0 0 0 0] # [0 0 0 0]]
tf.sparse_segment_sum_with_num_segments(c, tf.constant([0, 1]), tf.constant([0, 2], num_segments=4)) # => [[ 1 2 3 4] # [ 0 0 0 0] # [-1 -2 -3 -4] # [ 0 0 0 0]]
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- সূচকসমূহ: একটি একমাত্রিক টেনসর। এর র্যাঙ্ক
segment_idsএর সমান। - segment_ids: একটি এক-মাত্রিক টেনসর। মানগুলো সাজানো থাকবে এবং পুনরাবৃত্তি হতে পারবে।
- num_segments: এর মান স্বতন্ত্র সেগমেন্ট আইডি-র সংখ্যার সমান হওয়া উচিত।
ফেরত:
-
Output: ডেটার মতোই এর আকৃতি, তবে ডাইমেনশন ০-এর আকারnum_segments।
নির্মাতা এবং ধ্বংসকারী | |
|---|---|
SparseSegmentSumWithNumSegments (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input indices, :: tensorflow::Input segment_ids, :: tensorflow::Input num_segments) |
জনসাধারণের বৈশিষ্ট্য | |
|---|---|
operation | |
output | |
জনসাধারণের কার্যাবলী | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
জনসাধারণের বৈশিষ্ট্য
অপারেশন
Operation operation
আউটপুট
::tensorflow::Output output
জনসাধারণের কার্যাবলী
স্পার্স সেগমেন্ট সাম উইথ নাম্বার সেগমেন্টস
SparseSegmentSumWithNumSegments( const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input indices, ::tensorflow::Input segment_ids, ::tensorflow::Input num_segments )
নোড
::tensorflow::Node * node() const
অপারেটর::টেনসরফ্লো::ইনপুট
operator::tensorflow::Input() const
অপারেটর::টেনসরফ্লো::আউটপুট
operator::tensorflow::Output() const