如何用Tensorflow2.X运行1.X的代码。 AI浩 2021-09-28 287 阅读1分钟 import tensorflow.compat.v1 as tf tf.compat.v1.disable_eager_execution() 或 import tensorflow.compat.v1 as tf tf.disable_v2_behavior() 替换import tensorflow as tf