AttributeError: module ‘tensorflow’ has no attribute ‘placeholder’ 解决方法: import tensorflow.compat.v1 as tf 如果还出现报错,则需要关闭代码中关闭eager运算: tf.disable_eager_execution() 2.0版本和1.0有很多不兼容,还需要大家去发现。