tensorflow:: ops:: 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」に指定することもできます。この場合、データの格納順序は[バッチ、チャネル、高さ、幅]となります。
  • 膨張: 長さ 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)
ExplicitPaddings (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 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

パブリック静的関数

データフォーマット

Attrs DataFormat(
  StringPiece x
)

拡張

Attrs Dilations(
  const gtl::ArraySlice< int > & x
)

明示的なパディング

Attrs ExplicitPaddings(
  const gtl::ArraySlice< int > & x
)