# tensorflow::ops::ResizeNearestNeighbor

`#include <image_ops.h>`

Resize `images` to `size` using nearest neighbor interpolation.

## Summary

Args:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- images: 4-D with shape `[batch, height, width, channels]`.
- size: = A 1-D int32 [Tensor](https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of 2 elements: `new_height, new_width`. The new size for the images.

<br />

Optional attributes (see `https://www.tensorflow.org/versions/r2.12/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs`):

- align_corners: 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.

<br />

Returns:

- `https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output`: 4-D with shape `[batch, new_height, new_width, channels]`.

<br />

| ### Constructors and Destructors ||
|---|---|
| `https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/ops/resize-nearest-neighbor#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a761fcaa879c10aefeec7d336c1695dbe(const ::https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input images, ::https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input size)` ||
| `https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/ops/resize-nearest-neighbor#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1ae32cb1a2efb9fc7d9ecd04c33c95396a(const ::https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, ::https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input images, ::https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input size, const https://www.tensorflow.org/versions/r2.12/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs & attrs)` ||

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/ops/resize-nearest-neighbor#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1afbdcb2a978bc8cddb8a0ae142c6122b7` | `https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation` |
| `https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/ops/resize-nearest-neighbor#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a712b5521f03955dd2c8dd9d4fc80a8e9` | `::https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/ops/resize-nearest-neighbor#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a32fd059ad2b707aeac9c69cdaeb7a41f() const ` | `::tensorflow::Node *` |
| `https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/ops/resize-nearest-neighbor#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a1c15b7ce69776c76fa911ed327e4ebe6() const ` |   |
| `https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/ops/resize-nearest-neighbor#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a3e913e24e4a326f695d0e58f1c759676() const ` |   |

| ### Public static functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/ops/resize-nearest-neighbor#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a48ad406e3999c115dcf8e8260c3861da(bool x)` | `https://www.tensorflow.org/versions/r2.12/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs` |
| `https://www.tensorflow.org/versions/r2.12/api_docs/cc/class/tensorflow/ops/resize-nearest-neighbor#classtensorflow_1_1ops_1_1_resize_nearest_neighbor_1a740fbf067e627cfad4d5d8eb1b17583a(bool x)` | `https://www.tensorflow.org/versions/r2.12/api_docs/cc/struct/tensorflow/ops/resize-nearest-neighbor/attrs#structtensorflow_1_1ops_1_1_resize_nearest_neighbor_1_1_attrs` |

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

## Public attributes

### operation

```
Operation operation
```

### resized_images

```
::tensorflow::Output resized_images
```

## Public functions

### ResizeNearestNeighbor

```
 ResizeNearestNeighbor(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input images,
  ::tensorflow::Input size
)
```

### ResizeNearestNeighbor

```
 ResizeNearestNeighbor(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input images,
  ::tensorflow::Input size,
  const ResizeNearestNeighbor::Attrs & attrs
)
```

### node

```
::tensorflow::Node * node() const 
```

### operator::tensorflow::Input

```
 operator::tensorflow::Input() const 
```

### operator::tensorflow::Output

```
 operator::tensorflow::Output() const 
```

## Public static functions

### AlignCorners

```
Attrs AlignCorners(
  bool x
)
```

### HalfPixelCenters

```
Attrs HalfPixelCenters(
  bool x
)
```