gpt4 book ai didi

python - "run"和 "step"在Tensorflow调试器(tfdbg)中对应什么?

转载 作者:行者123 更新时间:2023-11-30 09:48:36 25 4
gpt4 key购买 nike

我试图了解 Tensorflow 调试器 tfdbg 的工作原理:

with sv.managed_session(config=config_proto) as session:
session = tf_debug.LocalCLIDebugWrapperSession(session)
for i in range(config.max_epoch):
session.run(model.lr)

当调试器启动时,它会向我们显示以下窗口:

enter image description here

阅读完文档并观看 YouTube 上的一个小教程后,我无法理解“run”和“step”命令实际上代表什么,更重要的是它们如何与神经网络训练时间步长和纪元进行比较?

来自文档:

The run command causes tfdbg to execute until the end of the next Session.run() call, which calculates the model's accuracy using a test data set.

但是 Session.run 它只是:

... one "step" of TensorFlow computation, by running the necessary graph fragment to execute every Operation and evaluate every Tensor in fetches, substituting the values in feed_dict for the corresponding input values.

我是 TF 新手,我仍然不明白如何用神经网络步骤和纪元来解释“运行”。这当然使得使用 tfdbg 变得困难,因为在几次“运行”之后,我得到了大约 5000 行杂项张量和操作的列表,我需要搜索它们,但我不明白它们是什么我看着一个时间步或纪元的结果。当我们开发神经网络模型时,我们不会考虑 session 运行,不是吗?

那么,一个时期有多少个 session “运行”,这样我至少可以找到进入损失操作的张量?

最佳答案

在大多数 tensorflow 模型中,session.run 调用会处理一小批训练数据。每个时期有多少个小批量取决于您正在使用的特定模型和数据集。

关于python - "run"和 "step"在Tensorflow调试器(tfdbg)中对应什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49084636/

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