2016-12-20 47 views
1

我一直在努力學習tensorboard(從tensorflow(從github分叉,使用最新版本)以及每當得到上述錯誤我使用'標量'或'直方圖'函數 爲什麼標量函數被指向tensorflow.python.summary.summary?(它不應該是tensorflow.python.summary?)如果有人可以幫忙,那會很棒!在這兒附着的代碼:AttributeError:模塊'tensorflow.python.summary.summary'沒有屬性'標量'

import tensorflow as tf 
x = tf.Variable(tf.random_normal(5,5)) 
tf.summary.scalar('input', x) 

的輸出中是:

Traceback (most recent call last): 
File "tensorboardetest.py", line 4, in <module> 
tf.summary.scalar('input', x) 
AttributeError: module 'tensorflow.python.summary.summary' has no attribute 'scalar' 
+0

tensorflow 0.8.0,(git pull可能失敗了,我馬上更新它) – user3868971

回答

1

你實際上並沒有使用最新版本的TensorFlow。 :)

+0

更新似乎解決了這個問題。 – user3868971

相關問題