tensorflow 2以后的版本没有 'placeholder' 将import tensorflow as tf,替换为 import tensorflow.compat.v1 as tf tf.disable_v2_behavior()