tensorflow::ops::SparseSegmentSum

#include <math_ops.h>

Bir tensörün seyrek segmentleri boyunca toplamı hesaplar.

Özet

Bölümlendirme bölümünü okuyarak bölümlendirme kavramının açıklamasını inceleyebilirsiniz.

SegmentSum benzer, ancak segment_ids sıralaması data ilk boyutundan daha düşük olabilir ve bu da indices belirtilen 0. boyutun bir alt kümesini seçer.

Örneğin:

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

Argümanlar:

  • kapsam: Bir Kapsam nesnesi
  • İndeksler: 1 boyutlu bir tensör. segment_ids ile aynı sıralamaya sahiptir.
  • segment_ids: 1 boyutlu bir tensör. Değerler sıralı olmalı ve tekrarlanabilir.

İadeler:

  • Output : Veri ile aynı şekle sahiptir, ancak 0. boyutu k (segment sayısı) büyüklüğündedir.

Yapıcılar ve Yıkıcılar

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

Genel özellikler

operation
output

Kamusal işlevler

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

Genel özellikler

operasyon

Operation operation

çıktı

::tensorflow::Output output

Kamusal işlevler

SeyrekSegmentToplamı

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

düğüm

::tensorflow::Node * node() const 

operatör::tensorflow::Giriş

 operator::tensorflow::Input() const 

operatör::tensorflow::Çıktı

 operator::tensorflow::Output() const