“AttributeError: module 'tensorflow' has no attribute 'placeholder'”
import tensorflow.compat.v1 as tftf.disable_eager_execution()#这两步是为了解决tensorflow2.0运行1.0的代码会报错误:“AttributeError: module ‘tensorflow’ has no attribute ‘placeholder’”#以及tf.placeholder() is not compat...
·
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.
更多推荐
所有评论(0)