⭐️ 如果使用的是TensorFlow V2.X版本,则需要添加如下语句,解决兼容问题 import tensorflow.compat.v1 as tf tf.disable_v2_behavior()