[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.compat.v1.to_bfloat16\n\n\u003cbr /\u003e\n\n|---------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.1.0/tensorflow/python/ops/math_ops.py#L822-L838) |\n\nCasts a tensor to type `bfloat16`. (deprecated) \n\n tf.compat.v1.to_bfloat16(\n x, name='ToBFloat16'\n )\n\n| **Warning:** THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use [`tf.cast`](../../../tf/cast) instead.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|--------|--------------------------------------------------|\n| `x` | A `Tensor` or `SparseTensor` or `IndexedSlices`. |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A `Tensor` or `SparseTensor` or `IndexedSlices` with same shape as `x` with type `bfloat16`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|-------------|------------------------------------------|\n| `TypeError` | If `x` cannot be cast to the `bfloat16`. |\n\n\u003cbr /\u003e"]]