gpt4 book ai didi

ubuntu - TensorFlow 广泛而深入的示例错误

转载 作者:行者123 更新时间:2023-12-04 18:40:17 25 4
gpt4 key购买 nike

我想基于广泛而深入的 Tensorflow 教程 (here is its "Main" file this question is referring to) 构建一个二进制分类器.

作为第一步,我按原样运行默认示例并使用它来熟悉 TF,然后再使其适应我的需要。

我在运行它时遇到问题。在上述文件的第 199 行中,我必须替换
tensors_to_log={'average_loss': loss_prefix + 'head/truediv',
'loss': loss_prefix + 'head/weighted_loss/Sum'})


tensors_to_log={'average_loss': loss_prefix + 'head/weighted_loss/Sum'})

否则我会收到以下错误:
KeyError: "The name 'head/truediv:0' refers to a Tensor which does not exist. The operation, 'head/truediv', does not exist in the graph."

IDE 是 PyCharm,OS 是 Ubunty 16.04LTS,Tensorflow 版本是 1.5.0rc1(由于与 2007 年我的 cpu 的兼容性问题而不是更新)

什么可能导致这个/我该如何解决这个问题的根源?

我作为解决方法所做的代码更改是影响结果/保存模型的质量还是仅影响日志记录的质量?

最佳答案

提交问题并在此处提供代码删除示例:
github of tensorflow model
它应该有更多关于为什么会发生这种情况的答案。

关于ubuntu - TensorFlow 广泛而深入的示例错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49579096/

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