原因:
TF1.X的代码在TF2.X环境下运行
解决方法:
将
import tensorflow as tf
改为:
import tensorflow.compat.v1 as tf
tf.disable_eager_execution()
原因:
TF1.X的代码在TF2.X环境下运行
解决方法:
将
import tensorflow as tf
改为:
import tensorflow.compat.v1 as tf
tf.disable_eager_execution()