我已經安裝了tensorflow版本r0.11。AttributeError:模塊'tensorflow'沒有屬性'reset_default_graph'
在我的文件名cartpole.py
我已導入tensorflow
:
import tensorflow as tf
,並使用它:
tf.reset_default_graph()
試圖運行我的PyCharm項目中,我得到這個錯誤:
in <module>
tf.reset_default_graph()
AttributeError: module 'tensorflow' has no attribute 'reset_default_graph'
我該如何解決這個錯誤?
你能否提供一些更多的代碼?我有一種感覺,你可能沒有正確導入東西 – martianwars
或者你可能已經在項目中命名了一個文件'tensorflow.py' – martianwars