ValueError: Incompatible type conversion requested to type 'float32' for variable of type 'int32_ref

原因是因为

b = tf.Variable(0,tf.float32)
我忘记了写dtype,应该是

b = tf.Variable(0,dtype=tf.float32)

猜你喜欢

转载自blog.csdn.net/weixin_40639095/article/details/89331929
今日推荐