AttributeError: module ‘tensorflow’ has no attribute 'placeholder’问题
TensorFlow更新2.0版本之后。定义tf.placeholder时----报错module ‘tensorflow’ has no attribute ‘placeholder’。这是因为版本太高了,2.0不再这样定义了。如果还想沿用之前的使用方法,可以安装1.13.1版本的TensorFlow。
#卸载2.0版本
conda remove tensorflow
#安装1.13.1版本
conda install tensorflow==1.13.1
这样就OK啦