# tensorflow::ops::CropAndResize::Attrs Struct Reference

# tensorflow::ops::CropAndResize::Attrs

`#include <image_ops.h>`

Optional attribute setters for [CropAndResize](https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/crop-and-resize#classtensorflow_1_1ops_1_1_crop_and_resize).

## Summary

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/crop-and-resize/attrs#structtensorflow_1_1ops_1_1_crop_and_resize_1_1_attrs_1a68fe7c5f9f6c6289bd4e674b31290529 = 0.0f` | `float` |
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/crop-and-resize/attrs#structtensorflow_1_1ops_1_1_crop_and_resize_1_1_attrs_1a9b39d5075386c3c8a0678ddeb482d1d7 = "bilinear"` | `StringPiece` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/crop-and-resize/attrs#structtensorflow_1_1ops_1_1_crop_and_resize_1_1_attrs_1a516eb5e4125c3e4abf0b3a4e86f492ab(float x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/crop-and-resize/attrs#structtensorflow_1_1ops_1_1_crop_and_resize_1_1_attrs` Value used for extrapolation, when applicable. |
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/crop-and-resize/attrs#structtensorflow_1_1ops_1_1_crop_and_resize_1_1_attrs_1a2e87e7aef6ba8075918fa95259af4b6f(StringPiece x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/crop-and-resize/attrs#structtensorflow_1_1ops_1_1_crop_and_resize_1_1_attrs` A string specifying the sampling method for resizing. |

## Public attributes

### extrapolation_value_

```
float tensorflow::ops::CropAndResize::Attrs::extrapolation_value_ = 0.0f
```

### method_

```
StringPiece tensorflow::ops::CropAndResize::Attrs::method_ = "bilinear"
```

## Public functions

### ExtrapolationValue

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::CropAndResize::Attrs::ExtrapolationValue(
  float x
)
```
Value used for extrapolation, when applicable.

Defaults to 0

### Method

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::CropAndResize::Attrs::Method(
  StringPiece x
)
```
A string specifying the sampling method for resizing.

It can be either `"bilinear"` or `"nearest"` and default to `"bilinear"`. Currently two sampling methods are supported: Bilinear and Nearest Neighbor.

Defaults to "bilinear"