tensorflow每次运行发现多个图事件 [英] tensorflow Found more than one graph event per run
问题描述
我为本地模式下运行的ml引擎实验加载tensorboard,并得到以下警告:
每次运行发现多个图形事件,或者有一个包含graph_def的metagraph,以及一个或多个图形事件。用最新的事件覆盖图形
W0825 19:26:12.435613 Reloader event_accumulator.py: 311]每次运行发现多个metagraph事件,用最新的事件覆盖metagraph。
最初,我怀疑这是因为我没有清除我的 - logdir = $ OUTPUT_PATH
(正如其他帖子所建议的 - 但是,即使我执行了 rm -rf $ OUTPUT_PATH / *
我仍然收到此错误对于一个本地火车来说,这个错误是否可以指示我图中的一个更大的问题?
看起来你可能已经遇到这篇文章,但没有更多的信息,这是我可以提供的最好的信息:
这是一个已知问题,TensorBoard不喜欢它,当您从同一个单独运行中写入
多个事件文件时如果你为每次运行使用一个新的子目录(新的
hyperparameters =新的子目录),
将被修正。
您可能无意中编写了多个事件文件在相同的目录(例如,训练和eval?)。
另外,确保你在返回一个合适的 tf.estimator.EstimatorSpec
modes.EVAL
。从人口普查样本 :
if mode == Modes.EVAL:
labels_one_hot = tf.one_hot(
label_indices_vector,
depth = label_values.shape [0],
on_value = True,
off_value = False,
dtype = tf.bool
)
eval_metric_ops = {
'准确性':tf.metrics.accuracy(label_indices,predicted_indices),
'auroc':tf.metrics.auc(labels_one_hot,概率)
}
返回tf.estimator。 EstimatorSpec(
模式,损失=损失,eval_metric_ops = eval_metric_ops)
I am loading a tensorboard for my ml engine experiment that is running in local mode and got the following warning:
"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.
W0825 19:26:12.435613 Reloader event_accumulator.py:311] Found more than one metagraph event per run. Overwriting the metagraph with the newest event."
Originally, I suspected that this was because I had not cleared my --logdir=$OUTPUT_PATH
(as other posts suggested -- however, even if I performed rm -rf $OUTPUT_PATH/*
I am still getting this error for a local train. Could this error be indicative of a larger issue in my graph?
It looks like you may have already come across this post, but without more information, it's the best information I can provide:
This is a known issue, TensorBoard doesn't like it when you write multiple event files from separate runs in the same directory. It will be fixed if you use a new subdirectory for every run (new hyperparameters = new subdirectory).
You may be inadvertently writing multiple event files in the same directory (e.g. training and eval?).
Also, be sure you are returning an appropriate tf.estimator.EstimatorSpec
when in modes.EVAL
. From the census sample:
if mode == Modes.EVAL:
labels_one_hot = tf.one_hot(
label_indices_vector,
depth=label_values.shape[0],
on_value=True,
off_value=False,
dtype=tf.bool
)
eval_metric_ops = {
'accuracy': tf.metrics.accuracy(label_indices, predicted_indices),
'auroc': tf.metrics.auc(labels_one_hot, probabilities)
}
return tf.estimator.EstimatorSpec(
mode, loss=loss, eval_metric_ops=eval_metric_ops)
这篇关于tensorflow每次运行发现多个图事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!