關於tensorflow中tensorborad No dashboards are active for the current data set.的解決辦法

說明:這個問題,困惑了很久,在網上查了好久,一直沒能解決,直到我在stackoverflow上看到有一位博主的回答python

連接在這裏:(https://stackoverflow.com/questions/47113472/tensorboard-error-no-dashboards-are-active-for-current-data-set)ui

our issue may be related to the drive you are attempting to start tensorboard from and the drive your logdir is on. Tensorboard uses a colon to separate the optional run name and the path in the logdir flag, so your path is being interpreted as \path\to\output\folder with name C. This can be worked around by either starting tensorboard from the same drive as your log directory or by providing an explicit run name, e.g. --logdir=mylogs:C:\path\to\output\folder.blog

 

什麼意思呢?也就是說你的--logdir後面的文件和目錄是經過冒號分割的,先寫文件,再寫路徑:ip

附上個人代碼:ci

import tensorflow as tf
a=tf.constant(1,name="input_a")
b=tf.constant(2,name="input_b")
c=tf.multiply(a,b, name='mul_c')
d=tf.multiply(a,b, name='mul_d')
e=tf.add(c,d, name='add_e')
print(e)
sess=tf.Session()
sess.run(e)
writer=tf.summary.FileWriter('./my_graph',sess.graph)

 而後在console上執行:input

注意:tensorboard --logdir=file_name:path_nameit

tensorboard --logdir=my_graph:C:/Document/PY/tensorflowio

W0618 12:28:00.452951 Reloader tf_logging.py:121] Found more than one graph event per run, or there was a metagraph containing a graph_def, as well as one or more graph events.  Overwriting the graph with the newest event.
W0618 12:28:00.453946 Reloader tf_logging.py:121] Found more than one metagraph event per run. Overwriting the metagraph with the newest event.
TensorBoard 1.8.0 at http://LYUJIUJIN:6006 (Press CTRL+C to quit)console

 

相關文章
相關標籤/搜索