tensorflow :: ops :: DepthwiseConv2dNative
#include <nn_ops.h>
Oblicza dwuwymiarowy splot głęboki przy danych input
4-wymiarowych i tensorach filter
.
streszczenie
Mając wejściowy tensor shape [batch, in_height, in_width, in_channels]
i filtr / tensor jądra kształtu [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 (rozwijanie z 1 kanału do kanałów channel_multiplier
dla każdego), a następnie łączy wyniki razem. Zatem wyjście ma kanały 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]
Musi mieć strides[0] = strides[3] = 1
. W najczęstszym przypadku tych samych pasków poziomych i wierzchołków strides = [1, stride, stride, 1]
.
Argumenty:
- zakres: obiekt Scope
- kroki: 1-D długości 4. Krok okna przesuwnego dla każdego wymiaru
input
. - padding: typ algorytmu dopełniania, który ma być używany.
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 mógłby być „NCHW”, kolejność przechowywania danych: [partia, kanały, wysokość, szerokość].
- dylatacje: 1-D tensor długości 4. Współczynnik dylatacji dla każdego wymiaru
input
. Jeśli ustawiono na k> 1, między każdym elementem filtrującym w tym wymiarze będzie k-1 pominiętych komórek. Kolejność wymiarów jest określana na podstawie wartościdata_format
, patrz powyżej, aby uzyskać szczegółowe informacje. Dylatacje w wymiarze partii i głębokości muszą wynosić 1.
Zwroty:
-
Output
: tensor wyjściowy.
Konstruktorzy i niszczyciele | |
---|---|
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 metody ustawiające atrybuty dla DepthwiseConv2dNative . |
Atrybuty publiczne
operacja
Operation operation
wynik
::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 )
Dylatacje
Attrs Dilations( const gtl::ArraySlice< int > & x )