报错信息 AttributeError: module ‘tensorflow’ has no attribute ‘placeholder’ 解决办法 将原来的 import tensorflow as tf 替换成 import tensorflow.compat.v1 as tf tf.disable_v2_behavior() 再次运行代码即可