#include <nn_ops.h>
Performs max pooling on the input and outputs both max values and indices.
The indices in argmax
are flattened, so that a maximum value at position [b, y, x, c]
becomes flattened index ((b * height + y) * width + x) * channels + c
.
The indices returned are always in [0, height) x [0, width)
before flattening, even if padding is involved and the mathematically correct answer is outside (either negative or too large). This is a bug, but fixing it is difficult to do in a safe backwards compatible way, especially due to flattening.
Arguments:
[batch, height, width, channels]
. Input to pool over.Returns:
Output
output: The max pooled output tensor.Output
argmax: 4-D. The flattened indices of the max values chosen for each output. Constructors and Destructors | |
---|---|
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) |
Public attributes | |
---|---|
argmax | |
output |
Public static functions | |
---|---|
Targmax(DataType x) |
Structs | |
---|---|
tensorflow::ops::MaxPoolWithArgmax::Attrs | Optional attribute setters for MaxPoolWithArgmax. |
::tensorflow::Output argmax
::tensorflow::Output output
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 )
Attrs Targmax( DataType x )
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/max-pool-with-argmax.html