TensorBoard报错:InvalidArgumentError: You must feed a value for placeholder tensor 'inputs/x_input' wi

来源:互联网 发布:新蓝鸟轮毂数据 编辑:程序博客网 时间:2024/06/06 20:44

InvalidArgumentError: You must feed a value for placeholder tensor ‘inputs/x_input’ with dtype float

 [[Node: inputs/x_input = Placeholder[dtype=DT_FLOAT, shape=[], _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

在使用TensorBoard进行可视化的时候,出现了上面描述的错误。这个错误和dtype没有关系。目前个人理解为是当前路径下不能存在一个以上的events文件。解决方案有以下几个:
1. 到存储的路径下把之前生成的文件给删了;
2. 引用自别人的评论:

if you’re using IPython or Jupyter, it’ll cause that problem after running repeatedly.

there are two main ways that you could fix that:
A.

tf.reset_default_graph()

call firstly, before your tf operations code

B.
using

     with tf.Graph().as_default() as g:             # your tf operations code

For details, please refer https://stackoverflow.com/questions/35114376/error-when-computing-summaries-in-tensorflow

如果有别的错误也可以参考这篇博文:
http://blog.csdn.net/u012436149/article/details/53894364

阅读全文
0 0
原创粉丝点击