tensorflow:: ops:: MaxPoolWithArgmax

#include <nn_ops.h>

入力に対して最大プーリングを実行し、最大値とインデックスの両方を出力します。

まとめ

argmaxのインデックスはフラット化されるため、位置[b, y, x, c]の最大値はフラット化されたインデックスになります。 include_batch_in_indexが False の場合は(y * width + x) * channels + c 、 include_batch_in_indexが True の場合は((b * height + y) * width + x) * channels + c 。

フラット化前のインデックスは、パディングが関係していて数学的に正しい答えが範囲外(負の値または大きすぎる値)になる場合でも、常に[0, height) x [0, width)範囲内になります。これはバグですが、特にフラット化処理があるため、後方互換性を維持したまま安全に修正するのは困難です。

議論:

  • スコープ:スコープオブジェクト
  • 入力: 形状が[batch, height, width, channels]の 4 次元データ。プーリング対象の入力。
  • ksize: 入力テンソルの各次元に対応するウィンドウのサイズ。
  • ストライド:入力テンソルの各次元におけるスライディングウィンドウのストライド。
  • padding: 使用するパディングアルゴリズムの種類。

オプション属性( Attrs参照):

  • include_batch_in_index: argmaxのフラット化されたインデックスにバッチ次元を含めるかどうか。

返品:

  • Output : 最大プール出力テンソル。
  • Output argmax:4次元。各出力に対して選択された最大値の平坦化されたインデックス。

コンストラクターとデストラクタ

MaxPoolWithArgmax (const :: tensorflow::Scope & scope, :: tensorflow::Input input, const gtl::ArraySlice< int > & ksize, const gtl::ArraySlice< int > & strides, StringPiece padding)
MaxPoolWithArgmax (const :: tensorflow::Scope & scope, :: tensorflow::Input input, const gtl::ArraySlice< int > & ksize, const gtl::ArraySlice< int > & strides, StringPiece padding, const MaxPoolWithArgmax::Attrs & attrs)

公開属性

argmax
operation
output

パブリック静的関数

IncludeBatchInIndex (bool x)
Targmax (DataType x)

構造

tensorflow:: ops:: MaxPoolWithArgmax:: Attrs

MaxPoolWithArgmaxのオプション属性セッター。

公開属性

argmax

::tensorflow::Output argmax

手術

Operation operation

出力

::tensorflow::Output output

公的機能

MaxPoolWithArgmax

 MaxPoolWithArgmax(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  const gtl::ArraySlice< int > & ksize,
  const gtl::ArraySlice< int > & strides,
  StringPiece padding
)

MaxPoolWithArgmax

 MaxPoolWithArgmax(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  const gtl::ArraySlice< int > & ksize,
  const gtl::ArraySlice< int > & strides,
  StringPiece padding,
  const MaxPoolWithArgmax::Attrs & attrs
)

パブリック静的関数

IncludeBatchInIndex

Attrs IncludeBatchInIndex(
  bool x
)

ターグマックス

Attrs Targmax(
  DataType x
)