我得到這個錯誤,雖然到處被提及的正確實施this和this我已經看了file_writer = tf.summary.FileWriter('/path/to/logs', sess.graph)
。AttributeError的:模塊「tensorflow.python.summary.summary」有沒有屬性「的FileWriter」
以下是錯誤:
Traceback (most recent call last): File "tfvgg.py", line 304, in writer = tf.summary.FileWriter("/tmp/tfvgg", sess.graph) AttributeError: module 'tensorflow.python.summary.summary' has no attribute 'FileWriter'
下面是我使用的代碼:
# init
sess = tf.Session()
writer = tf.summary.FileWriter("/tmp/tfvgg", sess.graph)
init = tf.initialize_all_variables()
sess.run(init)
以前有改變使用FileWriter
正確的方法,因爲已經與其他summary
方法?
感謝您的Kris – McLeodx
你會顯示初始化? –
您使用了哪種版本的tensorflow? – kvorobiev