把代码进入tf环境中下面的代码 替换
import tensorflow as tf
替换成如下代码。
import tensorflow.compat.v1 as tf tf.disable_v2_behavior()