2017-05-24 63 views
0

我正在尝试将Kmean与我的数据一起使用但我在将数据提供给图表时遇到问题。我的代码是在这里与数据样本GITTensorflow中的进料数据

我得到错误:

tensorflow.python.framework.errors.InvalidArgumentError: You must feed a value for placeholder tensor 'Placeholder' with dtype float 

请帮我解决这个问题。在此先感谢

+0

只是FYI,有一个[Estimator for KMeans in TensorFlow contrib](https://www.tensorflow.org/api_docs/python/tf/contrib/learn/KMeansClustering)。 –

回答

0

这似乎是一个不好的设计说实话。占位符应该在KMean函数中定义。那么你应该使用它的名字给它,所以像

feed_dict = {'Placeholder:0': data} 

This should be relevant

于是,一切应该是不错的。