সেন্সরফ্লো :: অপস :: স্পারসেসমেন্টমেন্টসাম উইথনামসেজমেন্টস

#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]]

যুক্তি:

  • সুযোগ: একটি স্কোপ অবজেক্ট
  • সূচকগুলি: একটি 1-ডি টেনসর। segment_ids সমান র‌্যাঙ্ক রয়েছে
  • সেগমেন্ট_আইডস: একটি 1-ডি টেন্সর। মানগুলি বাছাই করা উচিত এবং পুনরাবৃত্তি করা যেতে পারে।
  • num_segment: স্বতন্ত্র সেগমেন্ট আইডি সংখ্যার সমান হওয়া উচিত।

রিটার্নস:

  • Output : মাত্রা 0 বাদে ডেটা হিসাবে একই আকার রয়েছে যার আকারের 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