# tensorflow::ops::StatelessSampleDistortedBoundingBox::Attrs Struct Reference

# tensorflow::
ops::
StatelessSampleDistortedBoundingBox::
Attrs

`
#include <image_ops.h>
`


Optional attribute setters for
[StatelessSampleDistortedBoundingBox](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/stateless-sample-distorted-bounding-box#classtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box)
.

## Summary

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs_1a90f440dff6a8abf604cc2ad1fd4592c0 = Default_area_range() ` | ` gtl::ArraySlice< float > ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs_1ab042790a34124474c599a0389a2f2d57 = Default_aspect_ratio_range() ` | ` gtl::ArraySlice< float > ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs_1a4283e87dbb4b8a465694cd56df9fb68e = 100 ` | ` int64 ` |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs_1a7dca75121b7c7dda9ee05aa96da5f433 = false ` | ` bool ` |

| ### Public functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs_1a58a9fbe92441a0ebf575bd5018965aa5 (const gtl::ArraySlice< float > & x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs ` The cropped area of the image must contain a fraction of the supplied image within this range. |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs_1a6b47c62e73665b407cb863c5396c80ba (const gtl::ArraySlice< float > & x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs ` The cropped area of the image must have an aspect ratio = width / height within this range. |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs_1a9d5a79f3ead7550d17e939b55f6a2199 (int64 x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs ` Number of attempts at generating a cropped region of the image of the specified constraints. |
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs_1a16f7ba28723af58b559921fda2ff2271 (bool x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/stateless-sample-distorted-bounding-box/attrs#structtensorflow_1_1ops_1_1_stateless_sample_distorted_bounding_box_1_1_attrs ` Controls behavior if no bounding boxes supplied. |

## Public attributes

### area_range_

```
gtl::ArraySlice< float > tensorflow::ops::StatelessSampleDistortedBoundingBox::Attrs::area_range_ = Default_area_range()
```

### aspect_ratio_range_

```
gtl::ArraySlice< float > tensorflow::ops::StatelessSampleDistortedBoundingBox::Attrs::aspect_ratio_range_ = Default_aspect_ratio_range()
```

### max_attempts_

```
int64 tensorflow::ops::StatelessSampleDistortedBoundingBox::Attrs::max_attempts_ = 100
```

### use_image_if_no_bounding_boxes_

```
bool tensorflow::ops::StatelessSampleDistortedBoundingBox::Attrs::use_image_if_no_bounding_boxes_ = false
```

## Public functions

### AreaRange

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::StatelessSampleDistortedBoundingBox::Attrs::AreaRange(
  const gtl::ArraySlice< float > & x
)
```

The cropped area of the image must contain a fraction of the supplied image within this range.


Defaults to \[0.05, 1\]

### AspectRatioRange

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::StatelessSampleDistortedBoundingBox::Attrs::AspectRatioRange(
  const gtl::ArraySlice< float > & x
)
```

The cropped area of the image must have an aspect ratio = width / height within this range.


Defaults to \[0.75, 1.33\]

### MaxAttempts

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::StatelessSampleDistortedBoundingBox::Attrs::MaxAttempts(
  int64 x
)
```

Number of attempts at generating a cropped region of the image of the specified constraints.


After
`
max_attempts
`
failures, return the entire image.


Defaults to 100

### UseImageIfNoBoundingBoxes

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::StatelessSampleDistortedBoundingBox::Attrs::UseImageIfNoBoundingBoxes(
  bool x
)
```

Controls behavior if no bounding boxes supplied.


If true, assume an implicit bounding box covering the whole input. If false, raise an error.


Defaults to false