W3cubDocs

/TensorFlow C++

tensorflow::ops::MaxPoolWithArgmax

#include <nn_ops.h>

Performs max pooling on the input and outputs both max values and indices.

Summary

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.

Arguments:

  • scope: A Scope object
  • input: 4-D with shape [batch, height, width, channels]. Input to pool over.
  • ksize: The size of the window for each dimension of the input tensor.
  • strides: The stride of the sliding window for each dimension of the input tensor.
  • padding: The type of padding algorithm to use.

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.

Public attributes

argmax

::tensorflow::Output argmax

output

::tensorflow::Output output

Public functions

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
)

Public static functions

Targmax

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