tensorflow - tensorflow_core._api.v2.random 没有属性 Generator
问题描述
当我尝试tensorflow_addons
使用 tensorflow 2.1导入时看到以下错误
> import tensorflow_addons as tfa
AttributeError: module 'tensorflow_core._api.v2.random' has no attribute 'Generator'
解决方案
您的 Tensorflow 和 Tensorflow-addons 版本之间存在不兼容性。要解决您的问题,请卸载当前版本并将其替换为您可以通过查看此表获得的正确版本
小提醒:要在终端中检查您的 Tensorflow 版本类型:
python -c 'import tensorflow as tf; print(tf.__version__)'
推荐阅读
- templates - 从特征函数中返回复制值的迭代器
- gradle - Gradle gluonfx 插件,nativeBuild:“错误:应该在运行时初始化的类在图像构建期间被初始化”
- javascript - 关于 Protractor 中的输入的并行执行
- c# - 为什么在运行 AForge.Video.FFMPEG 时出现错误 BadImageFormatException?
- python - 破折号引导网格不起作用:未显示列
- c# - 任务
退出事件 - python - Pyython 中的 Numpy 数组生成
- json - 如何存储排序功能并从数据库中获取
- android - 如何在android中暴露的下拉菜单上加载不同样式的菜单
- android - Facebook 自定义 url 方案