Returns `True` if the elements of `tensor` are numbers. Specifically, returns `True` if the dtype of `tensor` is one of the following: * `tf.float32` * `tf.float64` * `tf.int8` * `tf.int16` * `tf.int32` * `tf.int64` * `tf.uint8` * `tf.qint8` * `tf.qint32` * `tf.quint8` * `t
(tensor)
| 1874 | v1=['debugging.is_numeric_tensor', 'is_numeric_tensor']) |
| 1875 | @deprecation.deprecated_endpoints('is_numeric_tensor') |
| 1876 | def is_numeric_tensor(tensor): |
| 1877 | """Returns `True` if the elements of `tensor` are numbers. |
| 1878 | |
| 1879 | Specifically, returns `True` if the dtype of `tensor` is one of the following: |
| 1880 | |
| 1881 | * `tf.float32` |
| 1882 | * `tf.float64` |
| 1883 | * `tf.int8` |
| 1884 | * `tf.int16` |
| 1885 | * `tf.int32` |
| 1886 | * `tf.int64` |
| 1887 | * `tf.uint8` |
| 1888 | * `tf.qint8` |
| 1889 | * `tf.qint32` |
| 1890 | * `tf.quint8` |
| 1891 | * `tf.complex64` |
| 1892 | |
| 1893 | Returns `False` if `tensor` is of a non-numeric type or if `tensor` is not |
| 1894 | a `tf.Tensor` object. |
| 1895 | """ |
| 1896 | return isinstance(tensor, ops.Tensor) and tensor.dtype in NUMERIC_TYPES |
| 1897 | |
| 1898 | |
| 1899 | @tf_export( |
no outgoing calls
no test coverage detected