如在安装2以上的TensorFlow想使用1的版本,只需在文件开头添加如下三行语句
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior() # 使用静态图模式运行以下代码
assert tf.__version__.startswith('2.')
如在安装2以上的TensorFlow想使用1的版本,只需在文件开头添加如下三行语句
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior() # 使用静态图模式运行以下代码
assert tf.__version__.startswith('2.')
https://github.com/ddean2009/blog-auto-publishing-tools
一. 二. 三. ! 作 者 : Yaopengfei(姚鵬飛) 博客地址 : http://www.cnblogs.com
ERROR Failed to compile with 1 error