2017-07-31 42 views
0

我是機器學習的新手,想試試張量流。 我的IDE是Pycharm,用於過去工作。 但是我更新到7月25日發佈的最新版本後,無法正確識別tensorflow庫。即使我嘗試過基本功能。最新Pycharm版本:模塊'tensorflow'沒有屬性'常量'

import tensorflow as tf 
node = tf.constant(4.0) 
print(node) 

提高錯誤,如:

AttributeError: module 'tensorflow' has no attribute 'constant' 

這裏是我的項目的解釋,我用: project interpreter

誰能幫助?

+0

你在同一目錄下有一個文件'tensorflow.py'嗎? – aristotll

+0

@aristotll你是對的,我在我的文件上做了一個非常愚蠢的名字。非常感謝你的理解。 –

回答

0

我對我的文件名做出了一個非常可怕的決定。在我將它改回來之後,一切正常

相關問題