# tensorflow::ops::MaxPool::Attrs Struct Reference

# tensorflow::
ops::
MaxPool::
Attrs

`
#include <nn_ops.h>
`


Optional attribute setters for
[MaxPool](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/max-pool#classtensorflow_1_1ops_1_1_max_pool)
.

## Summary

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/max-pool/attrs#structtensorflow_1_1ops_1_1_max_pool_1_1_attrs_1a0ef1889743d4b66c14d04f4228678a44 = "NHWC" ` | ` StringPiece ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/max-pool/attrs#structtensorflow_1_1ops_1_1_max_pool_1_1_attrs_1a9216908c357f78b7b7468113899ab7b6 = {} ` | ` gtl::ArraySlice< int > ` |

| ### Public functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/max-pool/attrs#structtensorflow_1_1ops_1_1_max_pool_1_1_attrs_1ae58819a319133046495923de7bc76753 (StringPiece x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/max-pool/attrs#structtensorflow_1_1ops_1_1_max_pool_1_1_attrs ` Specify the data format of the input and output data. |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/max-pool/attrs#structtensorflow_1_1ops_1_1_max_pool_1_1_attrs_1a285e9dd0e549a3f01b411057e7dcb45a (const gtl::ArraySlice< int > & x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/max-pool/attrs#structtensorflow_1_1ops_1_1_max_pool_1_1_attrs ` Defaults to \[\]. |

## Public attributes

### data_format_

```
StringPiece tensorflow::ops::MaxPool::Attrs::data_format_ = "NHWC"
```

### explicit_paddings_

```
gtl::ArraySlice< int > tensorflow::ops::MaxPool::Attrs::explicit_paddings_ = {}
```

## Public functions

### DataFormat

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::MaxPool::Attrs::DataFormat(
  StringPiece x
)
```

Specify the data format of the input and output data.


With the default format "NHWC", the data is stored in the order of: \[batch, in_height, in_width, in_channels\]. Alternatively, the format could be "NCHW", the data storage order of: \[batch, in_channels, in_height, in_width\].


Defaults to "NHWC"

### ExplicitPaddings

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::MaxPool::Attrs::ExplicitPaddings(
  const gtl::ArraySlice< int > & x
)
```

Defaults to \[\].