tensorflow中的数据类型dtype

Tensorflow中,主要有以下几种数据类型(dtype),在旧版本中,不用加tf也能使用。

有符号整型

tf.int8:8位整数。

tf.int16:16位整数。

tf.int32:32位整数。

tf.int64:64位整数。

无符号整型

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

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

浮点型

tf.float16:16位浮点数。

tf.float32:32位浮点数。

tf.float64:64位浮点数。

tf.double:等同于tf.float64。

#### 字符串型

tf.string:字符串。

布尔型

tf.bool:布尔型。

复数型

tf.complex64:64位复数。

tf.complex128:128位复数。

猜你喜欢

转载自blog.csdn.net/promisejia/article/details/80806984
今日推荐