# tf.compat.v1.tpu.bfloat16_scope

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/tpu/bfloat16.py#L69-L88) |

Scope class for bfloat16 variables so that the model uses custom getter.

    @tf_contextlib.contextmanager
    tf.compat.v1.tpu.bfloat16_scope(
        name: Optional[Text] = None
    ) -> Generator[https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/compat/v1/variable_scope, None, None]

This enables variables to be read as bfloat16 type when using get_variable.

<br />

<br />

<br />

| ## Arguments ||
|---|---|
| `name` | Name to use for scope. |

<br />

<br />

<br />

<br />

| ## Yields ||
|---|---|
| a variable scope. ||

<br />