将张量流数据输入占位符Tensorflow

时间:2017-05-18 07:56:37

标签: python tensorflow

我在向占位符提供数据时遇到错误 代码要点是kmeans.py

错误是:

tensorflow.python.framework.errors.InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder' with dtype float and shape [200,2]
[[Node: Placeholder = Placeholder[dtype=DT_FLOAT, shape=[200,2], _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

1 个答案:

答案 0 :(得分:0)

进入占位符的那个不应该是张量流张量。 例如,如果后续行中x的数据类型是一个张量,

sess.run(some_fetches, feed_dict={input: x})

然后它将无法运行。这个没问题,

sess.run(some_fetches, feed_dict={input: sess.run(x)})

太丑了!

相关问题