tensorflow:: ops:: DepthwiseConv2dNative
#include <nn_ops.h> Oblicza dwuwymiarowy splot w głąb, biorąc pod uwagę czterowymiarowe input i tensory filter .
Streszczenie
Biorąc pod uwagę tensor wejściowy o kształcie [batch, in_height, in_width, in_channels] oraz tensor filtra/jądra o kształcie [filter_height, filter_width, in_channels, channel_multiplier] , zawierający filtry splotowe in_channels o głębokości 1, depthwise_conv2d stosuje inny filtr do każdego kanału wejściowego (rozszerzając z 1 kanału do channel_multiplier channels dla każdego), a następnie łączy wyniki. W ten sposób wynik ma in_channels * channel_multiplier channels.
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] Musi być strides[0] = strides[3] = 1 . W najczęstszym przypadku tych samych kroków poziomych i wierzchołkowych, strides = [1, stride, stride, 1] .
Argumenty:
- zakres: obiekt zakresu
- kroki: 1-D o długości 4. Krok okna przesuwnego dla każdego wymiaru danych
input. - padding: Typ algorytmu wypełniania, który ma zostać użyty.
Atrybuty opcjonalne (patrz Attrs ):
- data_format: Określ format danych wejściowych i wyjściowych. W domyślnym formacie „NHWC” dane są przechowywane w kolejności: [partia, wysokość, szerokość, kanały]. Alternatywnie, format może być „NCHW”, czyli w kolejności przechowywania danych: [partia, kanały, wysokość, szerokość].
- Dylatacje: jednowymiarowy tensor o długości 4. Współczynnik dylatacji dla każdego wymiaru danych
input. Jeśli ustawione na k > 1, między każdym elementem filtru w tym wymiarze będzie k-1 pominiętych komórek. Kolejność wymiarów jest określana przez wartośćdata_format, szczegóły powyżej. Dylatacje w wymiarach wsadowych i głębokości muszą wynosić 1.
Zwroty:
-
Output: Tensor wyjściowy.
Konstruktory i destruktory | |
|---|---|
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) |
Atrybuty publiczne | |
|---|---|
operation | |
output | |
Funkcje publiczne | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Publiczne funkcje statyczne | |
|---|---|
DataFormat (StringPiece x) | |
Dilations (const gtl::ArraySlice< int > & x) | |
Struktury | |
|---|---|
| tensorflow:: ops:: DepthwiseConv2dNative:: Attrs | Opcjonalne settery atrybutów dla DepthwiseConv2dNative . |
Atrybuty publiczne
działanie
Operation operation
wyjście
::tensorflow::Output output
Funkcje publiczne
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 )
węzeł
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Publiczne funkcje statyczne
Format danych
Attrs DataFormat( StringPiece x )
Rozszerzenia
Attrs Dilations( const gtl::ArraySlice< int > & x )