# tensorflow::ops::ResizeNearestNeighbor::Attrs Struct Reference

# tensorflow::
ops::
ResizeNearestNeighbor::
Attrs

`
#include <image_ops.h>
`


Optional attribute setters for
[ResizeNearestNeighbor](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/resize-nearest-neighbor#classtensorflow_1_1ops_1_1_resize_nearest_neighbor)
.

## Summary

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs_1a402aac078e97256eb36a2c506fd7fa08 = false ` | ` bool ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs_1a2746d2e7059065b351c89aaacb980c20 = false ` | ` bool ` |

| ### Public functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs_1ad232beade15d5da475d0c6ed4fb427a2 (bool x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs ` If true, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels. |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs_1aaab11af146fef7106824c2fbefb4a93e (bool x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs ` Defaults to false. |

## Public attributes

### align_corners_

```
bool tensorflow::ops::ResizeNearestNeighbor::Attrs::align_corners_ = false
```

### half_pixel_centers_

```
bool tensorflow::ops::ResizeNearestNeighbor::Attrs::half_pixel_centers_ = false
```

## Public functions

### AlignCorners

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::ResizeNearestNeighbor::Attrs::AlignCorners(
  bool x
)
```

If true, the centers of the 4 corner pixels of the input and output tensors are aligned, preserving the values at the corner pixels.


Defaults to false.


Defaults to false

### HalfPixelCenters

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::ResizeNearestNeighbor::Attrs::HalfPixelCenters(
  bool x
)
```

Defaults to false.