Google I/O में ट्यूनिंग के लिए धन्यवाद। मांग पर सभी सत्र देखें मांग पर देखें

टेंसरफ़्लो :: ऑप्स :: SparseSegmentSum

#include <math_ops.h>

किसी टेंसर के विरल खंडों के साथ योग की गणना करता है।

सारांश

खंडों के स्पष्टीकरण के लिए विभाजन पर अनुभाग पढ़ें।

SegmentSum तरह, लेकिन segment_ids data के पहले आयाम की तुलना में segment_ids रैंक कम हो सकती है, जो indices द्वारा निर्दिष्ट आयाम 0 के सबसेट का चयन करता है।

उदाहरण के लिए:

c = tf.constant([[1,2,3,4], [-1,-2,-3,-4], [5,6,7,8]])

# Select two rows, one segment.
tf.sparse_segment_sum(c, tf.constant([0, 1]), tf.constant([0, 0]))
# => [[0 0 0 0]]

# Select two rows, two segment.
tf.sparse_segment_sum(c, tf.constant([0, 1]), tf.constant([0, 1]))
# => [[ 1  2  3  4]
#     [-1 -2 -3 -4]]

# Select all rows, two segments.
tf.sparse_segment_sum(c, tf.constant([0, 1, 2]), tf.constant([0, 0, 1]))
# => [[0 0 0 0]
#     [5 6 7 8]]

# Which is equivalent to:
tf.segment_sum(c, tf.constant([0, 0, 1]))

तर्क:

  • गुंजाइश: एक स्कोप ऑब्जेक्ट
  • सूचकांक: एक 1-डी टेंसर। segment_ids समान रैंक है।
  • सेगमेंट_िड्स: ए-डी टेंसर। मानों को क्रमबद्ध किया जाना चाहिए और दोहराया जा सकता है।

रिटर्न:

  • Output : डेटा के समान आकार है, आयाम 0 को छोड़कर जिसका आकार k , सेगमेंट की संख्या।

कंस्ट्रक्टर और डिस्ट्रक्टर्स

SparseSegmentSum (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input indices, :: tensorflow::Input segment_ids)

सार्वजनिक विशेषताएँ

operation
output

सार्वजनिक कार्य

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

सार्वजनिक विशेषताएँ

ऑपरेशन

Operation operation

उत्पादन

::tensorflow::Output output

सार्वजनिक कार्य

SparseSegmentSum

090bbf600

नोड

::tensorflow::Node * node() const 

ऑपरेटर :: टेंसरफ़्लो :: इनपुट

 operator::tensorflow::Input() const 
है

ऑपरेटर :: टेंसरफ़्लो :: आउटपुट

 operator::tensorflow::Output() const