텐서플로우:: 작전:: 정렬되지 않은 세그먼트 합계

#include <math_ops.h>

텐서의 세그먼트를 따라 합계를 계산합니다.

요약

세그먼트에 대한 설명은 세그먼트화 섹션을 읽어보세요.

합이 튜플 j... 초과하는 \(output[i] = {j...} data[j...]\) 과 같은 텐서를 계산합니다. 따라서 segment_ids[j...] == i . SegmentSum 과 달리 segment_ids 정렬할 필요가 없으며 유효한 값의 전체 범위에 있는 모든 값을 포함할 필요도 없습니다.

주어진 세그먼트 ID i 에 대한 합계가 비어 있으면 output[i] = 0 . 주어진 세그먼트 ID i 가 음수이면 값이 삭제되고 세그먼트 합계에 추가되지 않습니다.

num_segments 개별 세그먼트 ID의 수와 동일해야 합니다.

c = tf.constant([[1,2,3,4], [5,6,7,8], [4,3,2,1]])
tf.unsorted_segment_sum(c, tf.constant([0, 1, 0]), num_segments=2)
# ==> [[ 5,  5, 5, 5],
#       [5,  6, 7, 8]]

인수:

  • 범위: 범위 개체
  • Segment_ids: 모양이 data.shape 접두사인 텐서.

보고:

  • Output : 크기가 num_segments 인 단일 차원으로 대체되는 첫 번째 segment_ids.rank 차원을 제외하고 데이터와 모양이 동일합니다.

생성자와 소멸자

UnsortedSegmentSum (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input segment_ids, :: tensorflow::Input num_segments)

공개 속성

operation
output

공공 기능

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

공개 속성

작업

Operation operation

산출

::tensorflow::Output output

공공 기능

정렬되지 않은 세그먼트 합계

 UnsortedSegmentSum(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input data,
  ::tensorflow::Input segment_ids,
  ::tensorflow::Input num_segments
)

마디

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const