gpt4 book ai didi

python - Colab 上的 Tensorflow Eager Execution

转载 作者:行者123 更新时间:2023-11-28 20:32:36 31 4
gpt4 key购买 nike

我试图在 Colab 笔记本上使用 Tensorflow 启用即时执行,但我收到一条错误消息:

import tensorflow as tf
import tensorflow.contrib.eager as tfe

tf.enable_eager_execution()

ValueError: tf.enable_eager_execution must be called at program startup

我尝试单击“重置运行时”以在启动时运行 tf.enable_eager_execution,但错误再次出现。

打开另一个笔记本没有帮助。

在出现此错误后,我可以在 Colab 中做什么以允许立即执行?

谢谢。

最佳答案

这是我们这边的一个错误,现已修复,原始代码片段应该可以再次运行。参见 Tensorflow eager mode dose not work when GPU is enabled in google colab · Issue #262 · googlecolab/colabtools .

(注意:我是 Google Colaboratory 团队的成员。)

关于python - Colab 上的 Tensorflow Eager Execution,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52242527/

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