tensorflow 出錯module 'tensorflow' has no attribute 'layers'

出錯:module 'tensorflow' has no attribute 'layers' 解決方法:由於已經安裝的tensorflow是0.x的版本,0.x版本沒有layers模塊所以程序出錯,需要重新安裝tensorflow 1.0以上的版本,即更新tensorflow版本。 查看目前tensorflow版本 pip list 顯示:如下圖,此時的tensorflow爲0.12.0版本
相關文章
相關標籤/搜索