import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
这个代码 会显示 无compat模块,修改方法:
# import tensorflow.compat.v1 as tf
import tensorflow._api.v2.compat.v1 as tf
tf.disable_v2_behavior()
就可以解决这个问题了。
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
这个代码 会显示 无compat模块,修改方法:
# import tensorflow.compat.v1 as tf
import tensorflow._api.v2.compat.v1 as tf
tf.disable_v2_behavior()
就可以解决这个问题了。
您可能感兴趣的与本文相关的镜像
TensorFlow-v2.15
TensorFlow 是由Google Brain 团队开发的开源机器学习框架,广泛应用于深度学习研究和生产环境。 它提供了一个灵活的平台,用于构建和训练各种机器学习模型
3万+
1万+

被折叠的 条评论
为什么被折叠?
