tensorflow2.0运行1.0的代码会报错误:“AttributeError: module 'tensorflow' has no attribute 'placeholder'”
解决方案:
import tensorflow.compat.v1 as tf
并在代码中关闭eager运算:
tf.disable_eager_execution()
tensorflow2.0运行1.0的代码会报错误:“AttributeError: module 'tensorflow' has no attribute 'placeholder'”
解决方案:
import tensorflow.compat.v1 as tf
并在代码中关闭eager运算:
tf.disable_eager_execution()
本文标题:tensorflow2.0运行1.0的代码提示没有 'place
本文链接:https://www.haomeiwen.com/subject/kcyhoctx.html
网友评论