1.ValueError: Tensor conversion requested dtype int64 for Tensor with dtype float32: 'Tensor("loss/mul:0", shape=(), dtype=float32)'
解决方法:将报错项进行格式转换tf.to_float(self.predictions))
本文介绍了一种常见的Tensor类型转换错误ValueError:Tensor conversion requested dtype int64 for Tensor with dtype float32,并提供了详细的解决方案,即通过使用tf.to_float(self.predictions)进行格式转换。
1.ValueError: Tensor conversion requested dtype int64 for Tensor with dtype float32: 'Tensor("loss/mul:0", shape=(), dtype=float32)'
解决方法:将报错项进行格式转换tf.to_float(self.predictions))
6376
8042
2564
9306

被折叠的 条评论
为什么被折叠?