时间:2021-12-24 11:07:05 | 栏目:Python代码 | 点击:次
Attempting to use uninitialized value mean_squared_error/total
如图:

原因一:使用了tf.metrics.mean_squared_error(labels, predictions)
解决方法:
1.将其换成tf.losses.mean_squared_error(labels, preditions)
或者
2.加一个tf.lacal_variables_initializer()
原因二:将一些节点写在了tf.Session()里面如:

解决方法:
将节点定义在外面
