import tensorflow.compat.v1 as tf
tf.disable_eager_execution()
#这两步是为了解决tensorflow2.0运行1.0的代码会报错误:“AttributeError: module ‘tensorflow’ has no attribute ‘placeholder’”
#以及tf.placeholder() is not compatible with eager execution.
“AttributeError: module 'tensorflow' has no attribute 'placeholder'”
最新推荐文章于 2024-05-09 17:00:34 发布