Attempting to use uninitialized value mean_squared_error/total

如图:

tensorflow 报错unitialized value 解决方法

原因一:使用了tf.metrics.mean_squared_error(labels, predictions)

解决方法:

1.将其换成tf.losses.mean_squared_error(labels, preditions)

或者

2.加一个tf.lacal_variables_initializer()


原因二:将一些节点写在了tf.Session()里面如:

tensorflow 报错unitialized value 解决方法

解决方法:

将节点定义在外面

tensorflow 报错unitialized value 解决方法


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2022-02-28
  • 2022-12-23
  • 2021-04-08
猜你喜欢
  • 2021-12-05
  • 2021-05-23
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
  • 2021-08-28
  • 2022-02-23
相关资源
相似解决方案