# tf.container

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/framework/ops.py#L5177-L5188) |

Wrapper for [`Graph.container()`](https://www.tensorflow.org/versions/r1.15/api_docs/python/tf/Graph#container) using the default graph.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.container`](https://www.tensorflow.org/api_docs/python/tf/compat/v1/container)

<br />

    tf.container(
        container_name
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `container_name` | The container string to use in the context. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A context manager that specifies the default container to use for newly created stateful ops. ||

<br />