[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.to_float\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/python/ops/math_ops.py#L743-L759) |\n\nCasts a tensor to type `float32`. (deprecated)\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.to_float`](/api_docs/python/tf/compat/v1/to_float)\n\n\u003cbr /\u003e\n\n tf.to_float(\n x, name='ToFloat'\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 `float32`. ||\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 `float32`. |\n\n\u003cbr /\u003e"]]