在https://github.com/BinRoot/TensorFlow-Book/blob/master/ch02_basics/Concept08_TensorBoard.ipynbTensorboard在Windows報告「無標量數據發現」
做教程關閉TensorFlow社區Git倉庫當命令面板中,我得到運行tensorboard --logdir=path/to/logs
,在http://0.0.0.0:6006開始TensorBoard b'47' 。
然後,當我去探險家,看看它帶來的板,沒有標量數據被發現。我不知道我錯過了什麼。
複製,因爲我有它在我的Python腳本代碼:
import tensorflow as tf
import numpy as np
raw_data = np.random.normal(10, 1, 100)
alpha = tf.constant(0.05)
curr_value = tf.placeholder(tf.float32)
prev_avg = tf.Variable(0.)
update_avg = alpha * curr_value + (1 - alpha) * prev_avg
avg_hist = tf.summary.scalar("running_average", update_avg)
value_hist = tf.summary.scalar("incoming_values", curr_value)
merged = tf.summary.merge_all()
writer = tf.summary.FileWriter("./logs")
init = tf.global_variables_initializer()
with tf.Session() as sess:
sess.run(init)
for i in range(len(raw_data)):
summary_str, curr_avg = sess.run([merged, update_avg], feed_dict=
{curr_value: raw_data[i]})
sess.run(tf.assign(prev_avg, curr_avg))
print(raw_data[i], curr_avg)
writer.add_summary(summary_str, i)
你的配置是什麼? – user1735003
窗戶10,python 3.5.2,沒有GPU的張量,Internet Explorer和鉻 –