tensorflow :: ops :: Cumsum

#include <math_ops.h>

axis 따라 텐서 x 의 누적 합을 계산합니다.

요약

기본적으로이 연산은 포괄적 인 cumsum을 수행합니다. 즉, 입력의 첫 번째 요소가 출력의 첫 번째 요소와 동일합니다.

tf.cumsum([a, b, c])  # => [a, a + b, a + b + c]

exclusive kwarg를 True 로 설정하면 exclusive cumsum이 대신 수행됩니다.

tf.cumsum([a, b, c], exclusive=True)  # => [0, a, a + b]

reverse kwarg를 True 로 설정하면 cumsum이 반대 방향으로 수행됩니다.

tf.cumsum([a, b, c], reverse=True)  # => [a + b + c, b + c, c]

이것은 별도의 tf.reverse ops를 사용하는 것보다 효율적입니다.

reverseexclusive kwargs도 결합 할 수 있습니다.

tf.cumsum([a, b, c], exclusive=True, reverse=True)  # => [b + c, c, 0]

인수 :

  • 범위 : 범위 개체
  • x : Tensor . 다음 유형 중 하나 여야합니다 float32 , float64 , int64 , int32 , uint8 , uint16 , int16 , int8 , complex64 , complex128 , qint8 , quint8 , qint32 , half .
  • axis : int32 유형의 Tensor (기본값 : 0). [-rank(x), rank(x)) 범위에 있어야합니다.

선택적 속성 ( Attrs 참조) :

  • exclusive : True 이면 독점 cumsum을 수행합니다.
  • reverse : bool (기본값 : False).

보고:

생성자와 소멸자

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)

공용 속성

operation
out

공공 기능

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

공개 정적 함수

Exclusive (bool x)
Reverse (bool x)

구조체

tensorflow :: ops :: Cumsum :: Attrs

Cumsum에 대한 선택적 속성 설정자.

공용 속성

조작

Operation operation

::tensorflow::Output out

공공 기능

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
)

마디

::tensorflow::Node * node() const 

연산자 :: tensorflow :: 입력

 operator::tensorflow::Input() const 

연산자 :: tensorflow :: 출력

 operator::tensorflow::Output() const 

공개 정적 함수

독특한

Attrs Exclusive(
  bool x
)

역전

Attrs Reverse(
  bool x
)