【发布时间】:2016-09-19 21:50:49
【问题描述】:
我已经尝试使用 tensorflow 两天了,现在在 python2.7 和 3.4 中一遍又一遍地安装和重新安装它。无论我做什么,在尝试使用 tensorflow.placeholder() 时都会收到此错误消息
这是非常样板的代码:
tf_in = tf.placeholder("float", [None, A]) # Features
无论我做什么,我总能得到回溯:
Traceback (most recent call last):
File "/home/willim/PycharmProjects/tensorflow/tensorflow.py", line 2, in <module>
import tensorflow as tf
File "/home/willim/PycharmProjects/tensorflow/tensorflow.py", line 53, in <module>
tf_in = tf.placeholder("float", [None, A]) # Features
AttributeError: 'module' object has no attribute 'placeholder'
有人知道我该如何解决这个问题吗?
【问题讨论】:
-
顺便问一下,你工作的地方有其他文件名
tensorflow.py吗?
标签: python machine-learning tensorflow