module tensorflow has no attribute placeholder 的解决办法
刚开始试了下面这种方法import tensorflow.compat.v1 as tf结果这种方法不可行import tensorflow as tftf.compat.v1.disable_eager_execution()这种方法可行
·
刚开始试了下面这种方法
import tensorflow.compat.v1 as tf
结果这种方法不可行
import tensorflow as tf
tf.compat.v1.disable_eager_execution()
这种方法可行
当然在下面使用v1中的独有的方法的时候依然需要tf.compat.v1
更多推荐



所有评论(0)