TensorFlow中的int32_ref、float32_ref类型

生态人

关注

阅读 20

2023-10-27

 

在用TensorFlow_1.14.0中发现数据类型的显示带有 _ref :

x1=tf.Variable([1, 2, 3])
x2=tf.Variable([1.0, 2.0, 3.0])

 

TensorFlow中的int32_ref、float32_ref类型_数据类型

 

 

 

也就是说 int32_ref 其实就是 tf.int32,float32_ref 其实就是 tf.float32  。

 

个人理解:

带有 _ref 标志的TensorFlow变量其实一般是叶子节点,带有 _ref 也只是起到显示其是叶子节点作用,没有其他实际意义。

 

TensorFlow中的int32_ref、float32_ref类型_杂谈_02

 

 

----------------------------------------------

 

精彩评论(0)

0 0 举报