텐서플로우:: ops:: SegmentMean
#include <math_ops.h>텐서의 각 구간을 따라 평균값을 계산합니다.
요약
세그먼트에 대한 설명은 세그먼트 관련 섹션을 참조하십시오.
다음과 같은 텐서를 계산합니다. \(output_i = { data_j}{N}\) 여기서 mean 은 segment_ids[j] == i 인 j 에 대한 것이고 N 합산된 값의 총 개수입니다.
주어진 세그먼트 ID i 에 대한 평균이 비어 있는 경우 output[i] = 0 .

예를 들어:
c = tf.constant([[1.0,2,3,4], [4, 3, 2, 1], [5,6,7,8]]) tf.segment_mean(c, tf.constant([0, 0, 1])) # ==> [[2.5, 2.5, 2.5, 2.5], # [5, 6, 7, 8]]
논거:
- 범위: Scope 객체
- segment_ids:
data의 첫 번째 차원 크기와 동일한 크기의 1차원 텐서입니다. 값은 정렬되어 있어야 하며 중복될 수 있습니다.
보고:
-
Output: 데이터와 동일한 형태를 가지지만, 0번째 차원의 크기는 세그먼트 수인k입니다.
생성자와 소멸자 | |
|---|---|
SegmentMean (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input segment_ids) |
공개 속성 | |
|---|---|
operation | |
output | |
공공 기능 | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
공개 속성
작업
Operation operation
산출
::tensorflow::Output output
공공 기능
세그먼트 평균
SegmentMean( const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input segment_ids )
마디
::tensorflow::Node * node() const
연산자::텐서플로우::입력
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const