tensorflow2.0解决AttributeError: module ‘tensorflow’ has no attribute ‘GraphDef’
代码
graph_def = tf.GraphDef()
报错信息
AttributeError: module 'tensorflow' has no attribute 'GraphDef'
解决办法
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
tensorflow2.0不兼容tensorflow1.0