テンソルフロー::作戦:: DepthwiseConv2dNative
#include <nn_ops.h> 4 次元inputとfilterテンソルを指定して 2 次元の深さ方向の畳み込みを計算します。
まとめ
形状[batch, in_height, in_width, in_channels]の入力テンソルと、深さ 1 のin_channels畳み込みフィルターを含む形状[filter_height, filter_width, in_channels, channel_multiplier]のフィルター/カーネル テンソルを指定すると、 depthwise_conv2dは各入力チャンネルに異なるフィルターを適用します。 (それぞれのチャネルを 1 チャネルからchannel_multiplierチャネルに拡張)、結果を連結します。したがって、出力にはin_channels * channel_multiplierチャネルが含まれます。 
for k in 0..in_channels-1
  for q in 0..channel_multiplier-1
    output[b, i, j, k * channel_multiplier + q] =
      sum_{di, dj} input[b, strides[1] * i + di, strides[2] * j + dj, k] *
                        filter[di, dj, k, q] strides[0] = strides[3] = 1でなければなりません。水平方向と頂点のストライドが同じである最も一般的なケースでは、 strides = [1, stride, stride, 1]になります。
引数:
- スコープ:スコープオブジェクト
- strides: 長さ 4 の 1-D。 inputの各次元のスライディング ウィンドウのストライド。
- padding: 使用するパディング アルゴリズムのタイプ。
オプションの属性 ( Attrsを参照):
- data_format: 入出力データのデータ形式を指定します。デフォルトの形式「NHWC」では、データは[バッチ、高さ、幅、チャネル]の順序で保存されます。あるいは、形式を「NCHW」、つまりデータの保存順序を [バッチ、チャネル、高さ、幅] にすることもできます。
-  dilations: 長さ 4 の 1 次元テンソル。 inputの各次元の膨張係数。 k > 1 に設定すると、その次元の各フィルター要素間に k-1 個のスキップされたセルが存在します。ディメンションの順序はdata_formatの値によって決まります。詳細については上記を参照してください。バッチ内の膨張と深さの寸法は 1 である必要があります。
戻り値:
-  Output: 出力テンソル。
| コンストラクターとデストラクター | |
|---|---|
| DepthwiseConv2dNative (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding) | |
| DepthwiseConv2dNative (const :: tensorflow::Scope & scope, :: tensorflow::Input input, :: tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding, const DepthwiseConv2dNative::Attrs & attrs) | 
| パブリック属性 | |
|---|---|
| operation | |
| output | |
| 公共機能 | |
|---|---|
| node () const | ::tensorflow::Node * | 
| operator::tensorflow::Input () const | |
| operator::tensorflow::Output () const | |
| パブリック静的関数 | |
|---|---|
| DataFormat (StringPiece x) | |
| Dilations (const gtl::ArraySlice< int > & x) | |
| 構造体 | |
|---|---|
| tensorflow:: ops:: DepthwiseConv2dNative:: Attrs | DepthwiseConv2dNativeのオプションの属性セッター。 | 
パブリック属性
手術
Operation operation
出力
::tensorflow::Output output
公共機能
DepthwiseConv2dNative
DepthwiseConv2dNative( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding )
DepthwiseConv2dNative
DepthwiseConv2dNative( const ::tensorflow::Scope & scope, ::tensorflow::Input input, ::tensorflow::Input filter, const gtl::ArraySlice< int > & strides, StringPiece padding, const DepthwiseConv2dNative::Attrs & attrs )
ノード
::tensorflow::Node * node() const
演算子::tensorflow::入力
operator::tensorflow::Input() const
演算子::tensorflow::出力
operator::tensorflow::Output() const
パブリック静的関数
データ形式
Attrs DataFormat( StringPiece x )
拡張
Attrs Dilations( const gtl::ArraySlice< int > & x )