gpt4 book ai didi

tensorflow - 如何在Tensorflow中编写多次运行的摘要

转载 作者:行者123 更新时间:2023-12-03 08:21:00 24 4
gpt4 key购买 nike

如果您查看cifar10演示的Tensorboard dashboard,它将显示多次运行的数据。我很难找到一个很好的示例来说明如何设置图形以这种方式输出数据。我目前正在执行类似于this的操作,但似乎正在合并运行中的数据,并且每当新运行开始时,我都会在控制台上看到警告:

WARNING:root:Found more than one graph event per run.Overwritting the graph with the newest event

最佳答案

事实证明该解决方案很简单(并且可能有点明显),但无论如何我都会回答。编写者是这样实例化的:

writer = tf.train.SummaryWriter(FLAGS.log_dir, sess.graph_def)

当前运行的事件将写入指定的目录。无需设置 logdir参数的固定值,只需设置一个每次运行都会更新的变量,并将其用作日志目录内子目录的名称:

writer = tf.train.SummaryWriter('%s/%s' % (FLAGS.log_dir, run_var), sess.graph_def)

然后只需在通过 log_dir参数启动张量板时指定根 --logdir的位置。

关于tensorflow - 如何在Tensorflow中编写多次运行的摘要,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34551942/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com