テンソルフロー::作戦:: FusedResizeAndPadConv2D

#include <nn_ops.h>

畳み込み中に前処理としてサイズ変更とパディングを実行します。

まとめ

多くの場合、畳み込みのパッキング段階の一部として空間変換をより効率的に実行できるため、この演算により、これらの段階が融合された最適化された実装が可能になります。これにより、中間結果をテンソル全体として書き出す必要がなくなり、メモリ負荷が軽減され、変換計算をマージすることでレイテンシをいくらか向上させることができます。 Conv2Dの data_format 属性はこの操作ではサポートされておらず、デフォルトは「NHWC」順序になります。内部的には、この操作はグラフごとに 1 つのスクラッチ バッファーを使用します。これは、複数のバージョンが並行して実行されている場合にブロックされることを意味します。これは、この演算子が主にメモリ使用量を最小限に抑えるための最適化であるためです。

引数:

  • スコープ:スコープオブジェクト
  • 入力: 形状[batch, in_height, in_width, in_channels]の 4-D。
  • size: 2 つの要素の 1 次元 int32テンソル: new_height, new_width 。画像の新しいサイズ。
  • paddings: パディング サイズを指定する 2 列の行列。行数はinputのランクと同じである必要があります。
  • フィルター: 形状[filter_height, filter_width, in_channels, out_channels]の 4-D。
  • strides: 長さ 4 の 1-D。 inputの各次元のスライディング ウィンドウのストライド。 format で指定した次元と同じ順序である必要があります。
  • padding: 使用するパディング アルゴリズムのタイプ。

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

  • size_align_corners: true の場合、入力テンソルと出力テンソルの 4 つのコーナー ピクセルの中心が位置合わせされ、コーナー ピクセルの値が維持されます。デフォルトは false です。

戻り値:

  • Output : 出力テンソル。

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

FusedResizeAndPadConv2D (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input size, :: tensorflow::Input paddings, :: tensorflow::Input filter, StringPiece mode, const gtl::ArraySlice< int > & strides, StringPiece padding)
FusedResizeAndPadConv2D (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input size, :: tensorflow::Input paddings, :: tensorflow::Input filter, StringPiece mode, const gtl::ArraySlice< int > & strides, StringPiece padding, const FusedResizeAndPadConv2D::Attrs & attrs)

パブリック属性

operation
output

公共機能

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

パブリック静的関数

ResizeAlignCorners (bool x)

構造体

tensorflow:: ops:: FusedResizeAndPadConv2D:: Attrs

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

パブリック属性

手術

Operation operation

出力

::tensorflow::Output output

公共機能

FusedResizeAndPadConv2D

 FusedResizeAndPadConv2D(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input size,
  ::tensorflow::Input paddings,
  ::tensorflow::Input filter,
  StringPiece mode,
  const gtl::ArraySlice< int > & strides,
  StringPiece padding
)

FusedResizeAndPadConv2D

 FusedResizeAndPadConv2D(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input,
  ::tensorflow::Input size,
  ::tensorflow::Input paddings,
  ::tensorflow::Input filter,
  StringPiece mode,
  const gtl::ArraySlice< int > & strides,
  StringPiece padding,
  const FusedResizeAndPadConv2D::Attrs & attrs
)

ノード

::tensorflow::Node * node() const 

演算子::tensorflow::入力

 operator::tensorflow::Input() const 

演算子::tensorflow::出力

 operator::tensorflow::Output() const 

パブリック静的関数

サイズ変更角を揃える

Attrs ResizeAlignCorners(
  bool x
)