from tensorflow.python.eager.def_function import experimental_functions_run_eagerly ImportError: cannot import name 'experimental_functions_run_eagerly' from 'tensorflow.python.eager.def_function' (D:\anaconda\lib\site-packages\tensorflow\python\eager\def_function.py) >>>
时间: 2023-02-11 12:58:07 浏览: 96
这是一个导入错误,意思是在 tensorflow.python.eager.def_function 模块中找不到 experimental_functions_run_eagerly 这个名称。这可能是由于使用了过时或不正确的 TensorFlow 版本导致的。建议更新 TensorFlow 到最新版本或检查代码是否正确。
相关问题
spyder ImportError: cannot import name 'experimental_functions_run_eagerly' from 'tensorflow.python.eager.def_function' (D:\anaconda\lib\site-packages\tensorflow\python\eager\def_function.py)
这个错误表明在使用 Spyder 时,无法从 tensorflow.python.eager.def_function 模块中导入 experimental_functions_run_eagerly。这可能是由于 TensorFlow 的版本过低或者与 Spyder 的兼容性问题导致的。建议更新 TensorFlow 的版本或者尝试使用其他 IDE。
ImportError: cannot import name 'experimental_functions_run_eagerly' from 'tensorflow.python.eager.def_function' (D:\anaconda\lib\site-packages\tensorflow\python\eager\def_function.py)
这个错误消息表明在你的代码中,你正在尝试导入 tensorflow 库中的 experimental_functions_run_eagerly 模块,但是这个模块不存在于当前版本的 tensorflow 中。可能是你使用的是旧版本的 tensorflow,或者这个模块已经被弃用或者更名。建议检查你使用的 tensorflow 版本以及你的代码,确保你正在使用正确的模块。