# tensorflow::ops::Conv::Attrs

`#include <nn_ops.h>`

Optional attribute setters for [Conv](https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/conv#classtensorflow_1_1ops_1_1_conv).

## Summary

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a9ea9bdd5e248ff009ef531bbfe458e46 = 1` | `int64` |
| `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1aff55695e98f834da10a285550804803b = "CHANNELS_LAST"` | `StringPiece` |
| `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a4db909083b6f27df6a69054889526a7b = {}` | `gtl::ArraySlice< int >` |
| `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a465c3aa7dc1f13dedb38a57ff159bd19 = {}` | `gtl::ArraySlice< int >` |
| `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a3c434b7123f5e61eefd679a18acbfa71 = 1` | `int64` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1ab5b8710f807f79223170880f93680a2d(int64 x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs` A positive integer specifying the number of batch dimensions for the input tensor. |
| `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a804484932bce8c99d7845a8896aa8205(StringPiece x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs` Used to set the data format. |
| `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a82a108d5827ee742f96fc944ad7a533f(const gtl::ArraySlice< int > & x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs` 1-D tensor of length `N+2`. |
| `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a602efcc50b119951e0ed1af441521f28(const gtl::ArraySlice< int > & x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs` If `padding` is `"EXPLICIT"`, the list of explicit padding amounts. |
| `https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs_1a244d82ecbf3be1e1abaf581a15fc546c(int64 x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/api_docs/cc/struct/tensorflow/ops/conv/attrs#structtensorflow_1_1ops_1_1_conv_1_1_attrs` A positive integer specifying the number of groups in which the input is split along the channel axis. |

## Public attributes

### batch_dims_

```
int64 tensorflow::ops::Conv::Attrs::batch_dims_ = 1
```

### data_format_

```
StringPiece tensorflow::ops::Conv::Attrs::data_format_ = "CHANNELS_LAST"
```

### dilations_

```
gtl::ArraySlice< int > tensorflow::ops::Conv::Attrs::dilations_ = {}
```

### explicit_paddings_

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

### groups_

```
int64 tensorflow::ops::Conv::Attrs::groups_ = 1
```

## Public functions

### BatchDims

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::BatchDims(
  int64 x
)
```
A positive integer specifying the number of batch dimensions for the input tensor.

Should be less than the rank of the input tensor.

Defaults to 1

### DataFormat

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::DataFormat(
  StringPiece x
)
```
Used to set the data format.

By default `CHANNELS_FIRST`, uses `NHWC (2D) / NDHWC (3D)` or if `CHANNELS_LAST`, uses `NCHW (2D) / NCDHW (3D)`.

Defaults to "CHANNELS_LAST"

### Dilations

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::Dilations(
  const gtl::ArraySlice< int > & x
)
```
1-D tensor of length `N+2`.

The dilation factor for each dimension of `input`. If set to `k > 1`, there will be `k-1` skipped cells between each filter element on that dimension. The dimension order is determined by the value of `channels_last_format`, see above for details. Dilations in the batch and depth dimensions must be 1.

Defaults to \[\]

### ExplicitPaddings

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::ExplicitPaddings(
  const gtl::ArraySlice< int > & x
)
```
If `padding` is `"EXPLICIT"`, the list of explicit padding amounts.

For the ith dimension, the amount of padding inserted before and after the dimension is `explicit_paddings[2 * i]` and `explicit_paddings[2 * i + 1]`, respectively. If `padding` is not `"EXPLICIT"`, `explicit_paddings` must be empty.

Defaults to \[\]

### Groups

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::Conv::Attrs::Groups(
  int64 x
)
```
A positive integer specifying the number of groups in which the input is split along the channel axis.

Each group is convolved separately with `filters / groups` filters. The output is the concatenation of all the groups results along the channel axis. [Input](https://www.tensorflow.org/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input) channels and filters must both be divisible by groups.

Defaults to 1