- TensorFlow 2.0 Quick Start Guide
- Tony Holdroyd
- 60字
- 2021-06-24 16:02:04
Finding the datatype of a tensor
TensorFlow supports all of the datatypes you would expect. A full list is available at https://www.tensorflow.org/versions/r1.1/programmers_guide/dims_types and includes tf.int32 (the default integer type), tf.float32 (the default floating point type), and tf.complex64 (the complex type).
To find the datatype of a tensor, use the following dtype property:
t3.dtype
The output will be as follows:
tf.float32