python - 我在笔记本中将 tensorflow 作为 tf 导入并成功运行,但是当我使用 tf.__version__ 时,它显示 NameError: name 'tf' is not defined。帮我
问题描述
图片在这里第一个块运行没有任何错误。但第二个说名称错误 tf 未定义,即使我已将 tensorflow 导入为 tf.
解决方案
在这种情况下,我建议将 tensorflow 回滚到以前的稳定版本。这可能是当前版本的错误。
推荐阅读
- javascript - 如何在屏幕上列出所有 Firebase 存储文件
- php - PHP模数函数没有给我预期的结果
- opengl - 有什么办法可以旋转这只猫,让它水平并从右到左看?
- reactjs - 类型错误:无法读取未定义的属性“lng”
- javascript - 无法将 Firebase 实时数据库中的数据保存到 Vue.js 中的数组,并将其用于在 Vue2-google-maps 上显示标记
- php - 从 Codeigniter 中的多个表中获取和排序选定的数据
- python - AMONG US - 使用图论的原始问题
- html - 如何使用 pagedown 包模板在任何地方添加目录?
- arrays - 颤振获取json数组
- react-native - 无法使用 Expo 初始化应用程序 - 以下是终端中显示的错误