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