Tensorflow :: ops :: DepthwiseConv2dNative
#include <nn_ops.h>
Berechnet eine 2-D-Tiefenfaltung bei 4-D- input
und filter
.
Zusammenfassung
Bei einem Eingabetensor der Form [batch, in_height, in_width, in_channels]
und einem Filter- / Kernel-Tensor der Form [filter_height, filter_width, in_channels, channel_multiplier]
, der in_channels
Faltungsfilter der Tiefe 1 enthält, wird bei jedem Eingangskanal ein anderer Filter depthwise_conv2d
(Erweiterung von jeweils 1 Kanal auf channel_multiplier
Kanäle), verkettet dann die Ergebnisse miteinander. Somit hat der Ausgang in_channels * channel_multiplier
Kanäle.
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]
Muss strides[0] = strides[3] = 1
. Für den häufigsten Fall der gleichen horizontalen und vertikalen Schritte sind strides = [1, stride, stride, 1]
.
Argumente:
- scope: Ein Scope- Objekt
- Schritte: 1-D der Länge 4. Der Schritt des Schiebefensters für jede
input
. - padding: Die Art des zu verwendenden Auffüllalgorithmus.
Optionale Attribute (siehe Attrs
):
- Datenformat: Geben Sie das Datenformat der Eingabe- und Ausgabedaten an. Beim Standardformat "NHWC" werden die Daten in der folgenden Reihenfolge gespeichert: [Stapel, Höhe, Breite, Kanäle]. Alternativ könnte das Format "NCHW" sein, die Datenspeicherreihenfolge von: [Stapel, Kanäle, Höhe, Breite].
- Dilatationen: 1-D-Tensor der Länge 4. Der Dilatationsfaktor für jede
input
. Wenn k> 1 eingestellt ist, werden zwischen jedem Filterelement in dieser Dimension k-1 übersprungene Zellen angezeigt. Die Dimensionsreihenfolge wird durch den Wert vondata_format
, siehe oben für Details. Die Dilatationen in den Chargen- und Tiefenabmessungen müssen 1 betragen.
Kehrt zurück:
-
Output
: Der Ausgangstensor.
Konstruktoren und Destruktoren | |
---|---|
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) |
Öffentliche Attribute | |
---|---|
operation | |
output |
Öffentliche Funktionen | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Öffentliche statische Funktionen | |
---|---|
DataFormat (StringPiece x) | |
Dilations (const gtl::ArraySlice< int > & x) |
Strukturen | |
---|---|
tensorflow :: ops :: DepthwiseConv2dNative :: Attrs | Optionale Attributsetzer für DepthwiseConv2dNative . |
Öffentliche Attribute
Operation
Operation operation
Ausgabe
::tensorflow::Output output
Öffentliche Funktionen
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 )
Knoten
::tensorflow::Node * node() const
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Output
operator::tensorflow::Output() const
Öffentliche statische Funktionen
Datei Format
Attrs DataFormat( StringPiece x )
Dilatationen
Attrs Dilations( const gtl::ArraySlice< int > & x )