tensorflow :: ops :: SegmentMax
#include <math_ops.h>
テンソルのセグメントに沿った最大値を計算します。
概要
セグメントの説明については、セグメンテーションのセクションをお読みください。
\(output_i = (data_j)\)となるテンソルを計算します。ここで、 max
はj
をsegment_ids[j] == i
、 segment_ids[j] == i
ます。
maxは、所与のセグメントIDの空の場合はi
、 output[i] = 0
。
例えば:
c = tf.constant([[1,2,3,4], [4, 3, 2, 1], [5,6,7,8]]) tf.segment_max(c, tf.constant([0, 0, 1])) # ==> [[4, 3, 3, 4], # [5, 6, 7, 8]]
引数:
- スコープ:スコープオブジェクト
- segment_ids:サイズが
data
の最初の次元のサイズと等しい1次元テンソル。値は並べ替える必要があり、繰り返すことができます。
戻り値:
-
Output
:セグメント数であるサイズk
次元0を除いて、データと同じ形状です。
コンストラクタとデストラクタ | |
---|---|
SegmentMax (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
公の行事
SegmentMax
SegmentMax( 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