Casts a tensor to type `int64`. 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 `int64`. Raises: TypeError: If `x` cannot be cas
(x, name="ToInt64")
| 800 | @deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.") |
| 801 | @tf_export(v1=["to_int64"]) |
| 802 | def to_int64(x, name="ToInt64"): |
| 803 | """Casts a tensor to type `int64`. |
| 804 | |
| 805 | Args: |
| 806 | x: A `Tensor` or `SparseTensor` or `IndexedSlices`. |
| 807 | name: A name for the operation (optional). |
| 808 | |
| 809 | Returns: |
| 810 | A `Tensor` or `SparseTensor` or `IndexedSlices` with same shape as `x` with |
| 811 | type `int64`. |
| 812 | |
| 813 | Raises: |
| 814 | TypeError: If `x` cannot be cast to the `int64`. |
| 815 | """ |
| 816 | return cast(x, dtypes.int64, name=name) |
| 817 | |
| 818 | |
| 819 | @deprecation.deprecated(date=None, instructions="Use `tf.cast` instead.") |