解决TF2.X出现AttributeError: module ‘tensorflow‘ has no attribute ‘get_default_graph‘错误

        将tf.get_default_graph()

改为tf.compat.v1.get_default_graph()即可

Guess you like

Origin blog.csdn.net/athrunsunny/article/details/120742000