tensorflow:: 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]]
議論:
- スコープ:スコープオブジェクト
- segment_ids:
dataの第1次元と同じサイズの1次元テンソル。値はソートされている必要があり、重複しても構いません。
返品:
-
Output:次元0を除いてデータと同じ形状で、次元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
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const