Casts a tensor to type `complex64`. Args: x: A `Tensor` or `SparseTensor` or `IndexedSlices`. name: A name for the operation (optional). Returns: A `Tensor` or `SparseTensor` or `IndexedSlices` with same shape as `x` with type `complex64`. Raises: TypeError: If `x` canno
(x, name="ToComplex64")
| 838 | @deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.") |
| 839 | @tf_export(v1=["to_complex64"]) |
| 840 | def to_complex64(x, name="ToComplex64"): |
| 841 | """Casts a tensor to type `complex64`. |
| 842 | |
| 843 | Args: |
| 844 | x: A `Tensor` or `SparseTensor` or `IndexedSlices`. |
| 845 | name: A name for the operation (optional). |
| 846 | |
| 847 | Returns: |
| 848 | A `Tensor` or `SparseTensor` or `IndexedSlices` with same shape as `x` with |
| 849 | type `complex64`. |
| 850 | |
| 851 | Raises: |
| 852 | TypeError: If `x` cannot be cast to the `complex64`. |
| 853 | """ |
| 854 | return cast(x, dtypes.complex64, name=name) |
| 855 | |
| 856 | |
| 857 | @deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.") |