テンソルフロー::作戦::セグメントマックス

#include <math_ops.h>

テンソルのセグメントに沿った最大値を計算します。

まとめ

セグメントの説明については、セグメンテーションに関するセクションを参照してください。

\(output_i = (data_j)\) のようにテンソルを計算します。ここでmaxjを超え、 segment_ids[j] == iなります。

指定されたセグメント 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(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input data,
  ::tensorflow::Input segment_ids
)

ノード

::tensorflow::Node * node() const 

演算子::tensorflow::入力

 operator::tensorflow::Input() const 

演算子::tensorflow::出力

 operator::tensorflow::Output() const