在my_model_folder
内有文件:
model.ckpt-16320.data-00000-of-00001
model.ckpt-16320.meta
model.ckpt-16320.index
我想用TensorBoard将我的训练形象化。在bash中,我在bash中启动了python并运行以下代码:
import tensorflow as tf
g = tf.Graph()
with g.as_default() as g:
tf.train.import_meta_graph('./checkpoint/model.ckpt-16320.meta')
with tf.Session(graph=g) as sess:
file_writer = tf.summary.FileWriter(logdir='checkpoint_log_dir/faceboxes', graph=g)
然后我在bash中关闭python并运行
tensorboard --logdir checkpoint_log_dir/faceboxes/
我连接到了Tensorboard(我在bash中打印了一个链接),但该链接上的消息是:对于当前数据集,没有任何仪表板处于活动状态
可能是什么问题
最后解决这个问题的方法是从我的本地机器创建一个tunned。我在本地计算机上的新bash窗口中运行了以下代码:
然后,我设置了我的conda环境和特定于我的项目的其他环境,并将目录更改为这些文件所在的
my_model_folder
:然后,我在bash中通过运行
python
然后使用下面逐行输入的代码,我创建了一个
graphs
文件夹那我已经跑了
tensorboard logdir="./graphs"
最后,我在浏览器中输入了这个地址,瞧,我的张力板正在工作:
你能试试吗
如果这也不起作用,那么将最后一行替换为
tf.summary.FileWriter(logdir='./graphs', graph=g)
并调用tensorboard logdir="./graphs"
相关问题 更多 >
编程相关推荐