0
我在Tensorboard儀表板中沒有看到「標量」標題,儘管我已經實現了所需的代碼,只要我可以告訴。儘管已實施代碼,但未在Tensorboard中獲得「標量」儀表板
我正在使用的相關代碼:
# cost and accuracy
with tf.name_scope("xent"):
cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=fc3l[0], labels=y)
tf.scalar_summary('cross_entropy', cross_entropy)
with tf.name_scope("train"):
train_step = tf.train.AdamOptimizer(lr).minimize(cross_entropy)
with tf.name_scope("accuracy"):
correct_prediction = tf.equal(tf.argmax(probs, 1), tf.argmax(y, 0))
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
tf.scalar_summary('accuracy', accuracy)
# init
sess = tf.Session()
merged_summary = tf.merge_all_summaries()
writer = tf.train.SummaryWriter("/tmp/tfvgg/1", sess.graph)
init = tf.initialize_all_variables()
sess.run(init)
我使用Tensorflow版本0.11.0,而且我在Tensorboard我得到的標題是:「事件」,「圖片」,「音頻「,」圖形「,」分佈「,」直方圖「,但不是」標量「。
就我所知,我使用的TF版本不支持像tf.summary.merge_all()
和tf.summary.scalar()
這樣的實現。
標題你_running_'merged_summary'以及(即'SESS。 run(merged_summary)'在你的代碼中的某個地方?彙總也是Tensorflow計算圖的一部分,如果它們不是週期性的_run_,將不會被計算/刷新。 –