# tensorflow::ops::Variable::Attrs Struct Reference

# tensorflow::ops::Variable::Attrs

`#include <state_ops.h>`

Optional attribute setters for [Variable](https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/variable#classtensorflow_1_1ops_1_1_variable).

## Summary

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/variable/attrs#structtensorflow_1_1ops_1_1_variable_1_1_attrs_1a6e4b22d4fd5ffc4577ae074f5e8326fd = ""` | `StringPiece` |
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/variable/attrs#structtensorflow_1_1ops_1_1_variable_1_1_attrs_1ad319f0780ed16ffc06c0b37dde1d48c9 = ""` | `StringPiece` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/variable/attrs#structtensorflow_1_1ops_1_1_variable_1_1_attrs_1a03383bc7015aaa7a15753a1efd13f261(StringPiece x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/variable/attrs#structtensorflow_1_1ops_1_1_variable_1_1_attrs` If non-empty, this variable is placed in the given container. |
| `https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/variable/attrs#structtensorflow_1_1ops_1_1_variable_1_1_attrs_1aa39e5eb0fe345d5dbf228ead0475f83b(StringPiece x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.3/api_docs/cc/struct/tensorflow/ops/variable/attrs#structtensorflow_1_1ops_1_1_variable_1_1_attrs` If non-empty, this variable is named in the given bucket with this shared_name. |

## Public attributes

### container_

```
StringPiece tensorflow::ops::Variable::Attrs::container_ = ""
```

### shared_name_

```
StringPiece tensorflow::ops::Variable::Attrs::shared_name_ = ""
```

## Public functions

### Container

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::Variable::Attrs::Container(
  StringPiece x
)
```
If non-empty, this variable is placed in the given container.

Otherwise, a default container is used.

Defaults to ""

### SharedName

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::Variable::Attrs::SharedName(
  StringPiece x
)
```
If non-empty, this variable is named in the given bucket with this shared_name.

Otherwise, the node name is used instead.

Defaults to ""