我试图在Colab笔记本上使用Tensorflow进行急切执行,但是我收到一条错误消息:
import tensorflow as tf
import tensorflow.contrib.eager as tfe
tf.enable_eager_execution()
ValueError:必须在程序启动时调用tf.enable_eager_execution
我尝试单击“重置运行时”以便在启动时运行tf.enable_eager_execution但错误再次上升。
打开一个不同的笔记本没有帮助。
我可以在Colab中做什么,以便在此错误发生后允许急切执行?
谢谢。
这是我们方面的一个错误,修复现在正在进行,原始代码段应该再次运行。见Tensorflow eager mode dose not work when GPU is enabled in google colab · Issue #262 · googlecolab/colabtools。
(注意:我是Google Colaboratory团队的成员。)