1. 程式人生 > 其它 >解決AttributeError: module ‘tensorflow‘ has no attribute ‘reset_default_graph‘問題

解決AttributeError: module ‘tensorflow‘ has no attribute ‘reset_default_graph‘問題

技術標籤:深度學習tensorflowpython人工智慧

tensorflow版本問題
新增

tf=tf.compat.v1
tf.disable_v2_behavior()

問題解決
但是看到好多這種解決方案,但是沒用,因為匯入時壓根找不到compat包在這裡插入圖片描述