tensorflow::ops::Cumsum
#include <math_ops.h> x tensörünün x axis boyunca kümülatif toplamını hesaplayın.
Özet
Varsayılan olarak, bu işlem kapsayıcı bir kümülatif toplam gerçekleştirir; bu, girişin ilk elemanının çıkışın ilk elemanıyla aynı olduğu anlamına gelir:
tf.cumsum([a, b, c]) # => [a, a + b, a + b + c]
exclusive anahtar kelimesini ` True olarak ayarlayarak, bunun yerine özel bir `cumsum` işlemi gerçekleştirilir:
tf.cumsum([a, b, c], exclusive=True) # => [0, a, a + b]
reverse anahtar kelimesini ` True olarak ayarlayarak, kümülatif toplam ters yönde gerçekleştirilir:
tf.cumsum([a, b, c], reverse=True) # => [a + b + c, b + c, c]
Bu, ayrı ayrı tf.reverse işlemleri kullanmaktan daha verimlidir.
reverse ve exclusive kwarglar da birleştirilebilir:
tf.cumsum([a, b, c], exclusive=True, reverse=True) # => [b + c, c, 0]
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- x: Bir
Tensor. Aşağıdaki türlerden biri olmalıdır:float32,float64,int64,int32,uint8,uint16,int16,int8,complex64,complex128,qint8,quint8,qint32,half. - eksen:
int32türünde birTensor(varsayılan: 0).[-rank(x), rank(x))aralığında olmalıdır.
İsteğe bağlı özellikler (bkz. Attrs ):
- exclusive: Eğer
Trueise, exclusive cumsum işlemini gerçekleştir. - reverse: Bir
bool(varsayılan: False).
İadeler:
-
Output: Çıkış tensörü.
Yapıcılar ve Yıkıcılar | |
|---|---|
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) |
Genel özellikler | |
|---|---|
operation | |
out | |
Kamusal işlevler | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Herkese açık statik fonksiyonlar | |
|---|---|
Exclusive (bool x) | |
Reverse (bool x) | |
Yapılar | |
|---|---|
| tensorflow::ops::Cumsum::Attrs | Cumsum için isteğe bağlı öznitelik ayarlayıcıları. |
Genel özellikler
operasyon
Operation operation
dışarı
::tensorflow::Output out
Kamusal işlevler
Cumsum
Cumsum( const ::tensorflow::Scope & scope, ::tensorflow::Input x, ::tensorflow::Input axis )
Cumsum
Cumsum( const ::tensorflow::Scope & scope, ::tensorflow::Input x, ::tensorflow::Input axis, const Cumsum::Attrs & attrs )
düğüm
::tensorflow::Node * node() const
operatör::tensorflow::Giriş
operator::tensorflow::Input() const
operatör::tensorflow::Çıktı
operator::tensorflow::Output() const
Herkese açık statik fonksiyonlar
Özel
Attrs Exclusive( bool x )
Tersi
Attrs Reverse( bool x )