使用CMD or anconda prompt來運行tensorboard,解決(No dashboards are active for the current data set)問題

題外:cmd的簡單操作

            C盤進入D盤   在cmd 中輸入 d:

            tensorboard --logdir=g:/logsD盤進去其中子文件夾    cd D:/***

測試tensorboard能否正確運行的簡單例子:

import tensorflow as tf

input1 = tf.constant([1.0, 2.0, 3.0], name = 'input1')
input2 = tf.Variable(tf.random_uniform([3]), name = 'input2')
output = tf.add_n([input1, input2], name = 'add')

writer = tf.summary.FileWriter('g:/logs/', tf.get_default_graph())
writer.close()

參考地址 https://blog.csdn.net/sinat_20729643/article/details/78683677

會在g:/logs中生成一個文件。

然後我們在cmd中輸入   tensorboard --logdir=g:/logs

等運行完複製cmd中出現的網址,在explorer中打開即可。

最重要的一點!!!!文件目錄不能帶中文

最重要的一點!!!!文件目錄不能帶中文

最重要的一點!!!!文件目錄不能帶中文

不然會出現No dashboards are active for the current data set錯誤。我之前的目錄出現了中文名字,所以導致這個錯誤。把文件目錄改成全英文就可以正確運行了

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章