텐서플로우:: 연산:: 누적

#include <math_ops.h>

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

요약

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

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

exclusive 키워드 인수를 True 로 설정하면 대신 독점 누적 합계가 수행됩니다.

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

reverse 키워드 인수를 True 로 설정하면 누적 합계가 반대 방향으로 계산됩니다.

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

이는 개별적인 tf.reverse 연산을 사용하는 것보다 더 효율적입니다.

reverse 및 exclusive 키워드 인수도 결합할 수 있습니다.

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

논거:

  • 범위: Scope 객체
  • 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)

구조

텐서플로우:: 연산:: 누적:: 속성

Cumsum 에 대한 선택적 속성 설정기입니다.

공개 속성

작업

Operation operation

밖으로

::tensorflow::Output out

공공 기능

정액

 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
)

마디

::tensorflow::Node * node() const 

연산자::텐서플로우::입력

 operator::tensorflow::Input() const 

연산자::텐서플로우::출력

 operator::tensorflow::Output() const 

공개 정적 함수

독점적인

Attrs Exclusive(
  bool x
)

뒤집다

Attrs Reverse(
  bool x
)