tensorflow 数据类型

无符号整型

  • tf.uint8:8位无符号整数。
  • tf.uint16:16位无符号整数。

有符号整型

  • tf.int8:8位整数。
  • tf.int16:16位整数。
  • tf.int32:32位整数。
  • tf.int64:64位整数。

浮点型

  • tf.float16:16位浮点数。
  • tf.float32:32位浮点数。
  • tf.float64:64位浮点数。
  • tf.double:等同于tf.float64。

字符串型

  • tf.string:字符串。

布尔型

  • tf.bool:布尔型。

复数型

  • tf.complex64:64位复数。
  • tf.complex128:128位复数。

类型转换

https://www.malaoshi.top/show_1EF54XSPqhyE.html


原文出处:/show_1EF4vd8AxEVK.html