Tensorflow :: ops :: MaxPoolWithArgmax
#include <nn_ops.h>
Führt ein maximales Pooling für die Eingabe durch und gibt sowohl maximale Werte als auch Indizes aus.
Zusammenfassung
Die Indizes in argmax
werden abgeflacht, so dass ein Maximalwert an Position [b, y, x, c]
zu einem abgeflachten Index wird: (y * width + x) * channels + c
wenn include_batch_in_index
False ist; ((b * height + y) * width + x) * channels + c
wenn include_batch_in_index
True ist.
Die zurückgegebenen Indizes befinden sich vor dem Abflachen immer in [0, height) x [0, width)
, auch wenn eine Auffüllung erforderlich ist und die mathematisch korrekte Antwort außerhalb liegt (entweder negativ oder zu groß). Dies ist ein Fehler, aber es ist schwierig, ihn auf sichere, abwärtskompatible Weise zu beheben, insbesondere aufgrund der Abflachung.
Argumente:
- scope: Ein Scope- Objekt
- Eingabe: 4-D mit Form
[batch, height, width, channels]
. Eingabe zum Pooling. - ksize: Die Größe des Fensters für jede Dimension des Eingangstensors.
- Schritte: Der Schritt des Schiebefensters für jede Dimension des Eingangstensors.
- padding: Die Art des zu verwendenden Auffüllalgorithmus.
Optionale Attribute (siehe Attrs
):
- include_batch_in_index: Gibt an, ob die Batchdimension in den abgeflachten Index von
argmax
.
Kehrt zurück:
-
Output
Die maximale gepoolte Ausgabe Tensor. -
Output
argmax: 4-D. Die abgeflachten Indizes der für jede Ausgabe ausgewählten Maximalwerte.
Konstruktoren und Destruktoren | |
---|---|
MaxPoolWithArgmax (const :: tensorflow::Scope & scope, :: tensorflow::Input input, const gtl::ArraySlice< int > & ksize, const gtl::ArraySlice< int > & strides, StringPiece padding) | |
MaxPoolWithArgmax (const :: tensorflow::Scope & scope, :: tensorflow::Input input, const gtl::ArraySlice< int > & ksize, const gtl::ArraySlice< int > & strides, StringPiece padding, const MaxPoolWithArgmax::Attrs & attrs) |
Öffentliche Attribute | |
---|---|
argmax | |
operation | |
output |
Öffentliche statische Funktionen | |
---|---|
IncludeBatchInIndex (bool x) | |
Targmax (DataType x) |
Strukturen | |
---|---|
tensorflow :: ops :: MaxPoolWithArgmax :: Attrs | Optionale Attributsetzer für MaxPoolWithArgmax . |
Öffentliche Attribute
Argmax
::tensorflow::Output argmax
Operation
Operation operation
Ausgabe
::tensorflow::Output output
Öffentliche Funktionen
MaxPoolWithArgmax
MaxPoolWithArgmax( const ::tensorflow::Scope & scope, ::tensorflow::Input input, const gtl::ArraySlice< int > & ksize, const gtl::ArraySlice< int > & strides, StringPiece padding )
MaxPoolWithArgmax
MaxPoolWithArgmax( const ::tensorflow::Scope & scope, ::tensorflow::Input input, const gtl::ArraySlice< int > & ksize, const gtl::ArraySlice< int > & strides, StringPiece padding, const MaxPoolWithArgmax::Attrs & attrs )
Öffentliche statische Funktionen
IncludeBatchInIndex
Attrs IncludeBatchInIndex( bool x )
Targmax
Attrs Targmax( DataType x )