gpt4 book ai didi

python - 如何卸载 Tensorflow 2.0.0-alpha0?

转载 作者:太空宇宙 更新时间:2023-11-03 21:01:47 25 4
gpt4 key购买 nike

我正在使用 Sublime 文本编辑器使用 pythin 3.7 运行 TensorFlow 命令。特别是我尝试运行: tf.enable_eager_execution() 但出现错误:AttributeError:模块“tensorflow”没有属性“enable_eager_execution”我已经使用以下命令检查了我的tensorflow版本:print(tf.__version__),版本为:2.0.0-alpha0

奇怪的是,我已经使用pip3 uninstall tensorflow完全卸载了tensorflow,但我仍然在运行该版本。

通过阅读周围的内容,我相信由于我的tensorflow版本,我无法运行tf.enable_eager_execution(),这就是我尝试卸载它的原因。我还尝试使用tensorflow.contrib.eager显式调用它,但仍然没有成功。

最佳答案

TensorFlow 2.0eager execution by default 。要禁用急切执行,请使用

tf.compat.v1.disable_eager_execution()

关于python - 如何卸载 Tensorflow 2.0.0-alpha0?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55665138/

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