tensorflow :: ops :: DepthwiseConv2dNative
#include <nn_ops.h>
Menghitung konvolusi kedalaman 2-D dengan input
4-D dan tensor filter
.
Ringkasan
Dengan [batch, in_height, in_width, in_channels]
input tensor bentuk [batch, in_height, in_width, in_channels]
dan filter / kernel tensor bentuk [filter_height, filter_width, in_channels, channel_multiplier]
, yang berisi filter konvolusional in_channels
kedalaman 1, depthwise_conv2d
menerapkan filter yang berbeda untuk setiap saluran masukan (memperluas dari 1 saluran ke channel_multiplier
untuk masing-masing saluran), lalu menggabungkan hasilnya bersama-sama. Jadi, outputnya memiliki saluran 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]
Harus memiliki strides[0] = strides[3] = 1
. Untuk kasus paling umum dari langkah horizontal dan simpul yang sama, strides = [1, stride, stride, 1]
.
Argumen:
- scope: Objek Scope
- langkah: 1-D panjang 4. Langkah jendela geser untuk setiap dimensi
input
. - padding: Jenis algoritma padding yang akan digunakan.
Atribut opsional (lihat Attrs
):
- data_format: Menentukan format data input dan output data. Dengan format default "NHWC", data disimpan dalam urutan: [batch, height, width, channels]. Alternatifnya, formatnya bisa "NCHW", urutan penyimpanan data: [batch, channel, height, width].
- dilatasi: tensor 1-D dengan panjang 4. Faktor dilasi untuk setiap dimensi
input
. Jika disetel ke k> 1, akan ada sel yang dilewati k-1 di antara setiap elemen filter pada dimensi itu. Urutan dimensi ditentukan oleh nilaidata_format
, lihat detailnya di atas. Pelebaran dalam dimensi batch dan kedalaman harus 1.
Pengembalian:
-
Output
: Tensor keluaran.
Pembuat dan Penghancur | |
---|---|
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) |
Structs | |
---|---|
tensorflow :: ops :: DepthwiseConv2dNative :: Attrs | Penyetel 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 :: Keluaran
operator::tensorflow::Output() const
Fungsi statis publik
Format data
Attrs DataFormat( StringPiece x )
Dilatasi
Attrs Dilations( const gtl::ArraySlice< int > & x )