tensorflow :: ops :: FusedResizeAndPadConv2D
#include <nn_ops.h>
畳み込み中の前処理として、サイズ変更とパディングを実行します。
概要
多くの場合、畳み込みのパッキング段階の一部として空間変換をより効率的に行うことができるため、この操作により、これらの段階を融合する最適化された実装が可能になります。これにより、中間結果をテンソル全体として書き出す必要がなくなり、メモリの負荷が軽減されます。変換計算をマージすることで、レイテンシをいくらか向上させることができます。 Conv2Dのdata_format属性はこの操作ではサポートされておらず、デフォルトは「NHWC」の順序です。内部的には、この操作は単一のグラフごとのスクラッチバッファーを使用します。つまり、複数のバージョンが並行して実行されている場合はブロックされます。これは、この演算子が主にメモリ使用量を最小限に抑えるための最適化であるためです。
引数:
- スコープ:スコープオブジェクト
- 入力:形状
[batch, in_height, in_width, in_channels]
。 - サイズ:2要素の1-D int32テンソル:
new_height, new_width
。画像の新しいサイズ。 - パディング:パディングサイズを指定する2列の行列。行数は、
input
のランクと同じである必要がありinput
。 - フィルタ:形状が
[filter_height, filter_width, in_channels, out_channels]
。 - ストライド:長さ4の1-D。
input
各次元のスライディングウィンドウのストライド。 formatで指定されたディメンションと同じ順序である必要があります。 - パディング:使用するパディングアルゴリズムのタイプ。
オプションの属性(参照Attrs
):
- resize_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
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Output
operator::tensorflow::Output() const
パブリック静的関数
ResizeAlignCorners
Attrs ResizeAlignCorners( bool x )