###前提・実現したいこと
環境は
python=3.5
tensorflow=0.12.1
Mac OS X 10.12.3
です。
tensorboardで視覚化したいのですが、毎回
Starting TensorBoard b'39' on port 6006
と出力され、それ以降シェルから反応がありません。
###発生している問題・エラーメッセージ
tensorboard --logdir=[pwd]
とシェルで打つと
Starting TensorBoard b'39' on port 6006
とだけ返ってきます。
###該当のソースコード
python
1import numpy as np 2import tensorflow as tf 3 4input = [ 5 [1., 0., 0.], 6 [0., 1., 0.], 7 [0., 0., 1.] 8] 9 10winning_hands = [ 11 [0., 1., 0.], 12 [0., 0., 1.], 13 [1., 0., 0.] 14] 15 16def inference(input_placeholder): 17 with tf.name_scope('inference') as scope: 18 W = tf.Variable(tf.zeros([3, 3]), name="weight") 19 b = tf.Variable(tf.zeros([3]), name="bias") 20 21 y = tf.nn.softmax(tf.matmul(input_placeholder, W) + b) 22 return y 23 24def loss(output, supervisor_labels_placeholder): 25 with tf.name_scope('loss') as scope: 26 cross_entropy = -tf.reduce_sum(supervisor_labels_placeholder * tf.log(output)) 27 tf.scalar_summary("entropy", cross_entropy) 28 return cross_entropy 29 30def training(loss): 31 with tf.name_scope('training') as scope: 32 train_step = tf.train.GradientDescentOptimizer(0.01).minimize(loss) 33 return train_step 34 35 36with tf.Graph().as_default(): 37 supervisor_labels_placeholder = tf.placeholder("float", [None, 3], name="supervisor_labels_placeholder") 38 input_placeholder = tf.placeholder("float", [None, 3], name="input_labels_placeholder") 39 40 feed_dict={input_placeholder: input, supervisor_labels_placeholder: winning_hands} 41 42 output = inference(input_placeholder) 43 loss = loss(output, supervisor_labels_placeholder) 44 training_op = training(loss) 45 46 summary_op = tf.merge_all_summaries() 47 48 init = tf.initialize_all_variables() 49 50 with tf.Session() as sess: 51 summary_writer = tf.train.SummaryWriter('data', graph_def=sess.graph_def) 52 sess.run(init) 53 54 for step in range(1000): 55 sess.run(training_op, feed_dict=feed_dict) 56 if step % 100 == 0: 57 print(sess.run(loss, feed_dict=feed_dict)) 58 summary_str = sess.run(summary_op, feed_dict=feed_dict) 59 summary_writer.add_summary(summary_str, step)
###試したこと
このコードだけでなく、チュートリアルのコードでも結果は同様です。
###補足情報(言語/FW/ツール等のバージョンなど)
記事やブログを見ると、他の人たちは
Starting TensorBoard b'39' on port 6006
の後に
(You can navigate to http://localhost:6006)
と出ますが、自分のシェルでは長時間待ってもそれがでてきません。
あなたの回答
tips
プレビュー