tensorflow::ops::DepthwiseConv2dNative

#include <nn_ops.h>

Menghitung konvolusi kedalaman 2-D berdasarkan tensor input dan filter 4-D.

Ringkasan

Diberikan tensor input dengan bentuk [batch, in_height, in_width, in_channels] dan tensor filter/kernel dengan bentuk [filter_height, filter_width, in_channels, channel_multiplier] , yang berisi in_channels filter konvolusi dengan kedalaman 1, depthwise_conv2d menerapkan filter yang berbeda ke setiap saluran input (memperluas dari 1 saluran menjadi channel_multiplier saluran untuk masing-masing), kemudian menggabungkan hasilnya. Dengan demikian, output memiliki in_channels * channel_multiplier saluran.

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]

Harus memiliki strides[0] = strides[3] = 1 . Untuk kasus paling umum dari strides horizontal dan verteks yang sama, strides = [1, stride, stride, 1] .

Argumen:

  • Cakupan: Objek Cakupan
  • strides: 1-D dengan panjang 4. Langkah jendela geser untuk setiap dimensi input .
  • padding: Jenis algoritma padding yang akan digunakan.

Atribut opsional (lihat Attrs ):

  • data_format: Tentukan format data input dan output. Dengan format default "NHWC", data disimpan dalam urutan: [batch, tinggi, lebar, saluran]. Atau, formatnya bisa "NCHW", urutan penyimpanan data: [batch, saluran, tinggi, lebar].
  • Dilasi: tensor 1-D dengan panjang 4. Faktor dilasi untuk setiap dimensi input . Jika diatur ke k > 1, akan ada k-1 sel yang dilewati di antara setiap elemen filter pada dimensi tersebut. Urutan dimensi ditentukan oleh nilai data_format , lihat detail di atas. Dilasi pada dimensi batch dan kedalaman harus 1.

Mengembalikan:

Konstruktor dan Destruktor

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)

Atribut publik

operation
output

Fungsi publik

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

Fungsi statis publik

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

Struktur

tensorflow::ops::DepthwiseConv2dNative::Attrs

Pengaturan atribut opsional untuk DepthwiseConv2dNative .

Atribut publik

operasi

Operation operation

keluaran

::tensorflow::Output output

Fungsi publik

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
)

simpul

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

Fungsi statis publik

Format Data

Attrs DataFormat(
  StringPiece x
)

Dilasi

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