如何“重置"杀死 tensorflow 实例后的 tensorboard 数据 [英] How to "reset" tensorboard data after killing tensorflow instance

查看:74
本文介绍了如何“重置"杀死 tensorflow 实例后的 tensorboard 数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我构建的 cnn 模型测试不同的超参数,但在查看 Tensorboard 中的摘要时有一点烦恼.问题似乎是数据只是在连续运行中添加",因此函数会导致奇怪的叠加,除非我将信息视为相对"而不是逐步".看这里:

I'm testing different hyperparameters for a cnn model I built, but I'm having a small annoyance when viewing the summaries in Tensorboard. The problem seems to be that the data is just "added" in consecutive runs, so the functions result in a weird superposition unless I see the information as "relative" instead of "by step". See here:

我已经尝试杀死 tensorboard 的进程并删除日志文件,但似乎还不够.

I've tried killing tensorboard's process and erasing the log files, but it seems it is not enough.

问题是,我该如何重置这些信息?

谢谢!!

推荐答案

注意:您发布的解决方案(擦除 TensorBoard 的日志文件并终止进程)会起作用,但不是首选,因为它会破坏历史信息关于您的培训.

Note: The solution you've posted (erase TensorBoard's log files and kill the process) will work, but it isn't preferred, because it destroys historical information about your training.

相反,您可以将每个新的训练作业写入一个新的子目录(您的顶级日志目录).然后,TensorBoard 会将每个作业视为一次新的运行",并将创建一个很好的比较视图,以便您可以查看模型迭代之间的训练有何不同.

Instead, you can have each new training job write to a new subdirectory (of your top-level log directory). Then, TensorBoard will consider each job a new "run" and will create a nice comparison view so you can see how the training differed between iterations of your model.

在以下来自 https://www.tensorflow.org/tensorboard/get_started:

model = create_model()
...
model.compile(...)

log_dir = "logs/fit/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)

model.fit(..., callbacks=[tensorboard_callback])

这篇关于如何“重置"杀死 tensorflow 实例后的 tensorboard 数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆