<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.21.0/tensorflow/python/framework/ops.py#L4484-L4495) |

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

    tf.compat.v1.container(
        container_name
    ) -> ContextManager[str]

<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 />