module 'tensorflow_core._api.v2.config' has no attribute 'experimental_list_devices'
module 'tensorflow_core._api.v2.config' has no attribute 'experimental_list_devices'

报错如下
建立CNN层时出错:
module ‘tensorflow_core._api.v2.config’ has no attribute ‘experimental_list_devices’

环境
- keras cup版本
- Anaconda
解决方法
找到如下图路径:

修改506行:
_LOCAL_DEVICES = tf.config.experimental_list_devices()
为
devices = tf.config.list_logical_devices()
_LOCAL_DEVICES = [x.name for x in devices]
参考
module 'tensorflow_core._api.v2.config' has no attribute 'experimental_list_devices'的更多相关文章
- AttributeError: module ‘tensorflow.python.ops.nn’ has no attribute ‘leaky_relu’
#AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'leaky_relu' 的原因主要是版本的问题 解决方法是更新 ...
- 启动Tensorboard时发生错误:class BeholderHook(tf.estimator.SessionRunHook): AttributeError: module 'tensorflow.python.estimator.estimator_lib' has no attribute 'SessionRunHook'
报错:class BeholderHook(tf.estimator.SessionRunHook):AttributeError: module 'tensorflow.python.estimat ...
- AttributeError: module 'selenium.webdriver.common.service' has no attribute 'Service'
今天爬虫时需要使用到selenium, 使用pip install selenium进行安装. 可是一开始写程序就遇到了AttributeError: module 'selenium.webdriv ...
- 关于moviepy打包报错AttributeError: module audio/video.fx.all has no attribute fadein、crop文章的纠错和抄袭
专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 老猿学5G博文目录 老猿前面有篇文章<moviepy应用pyin ...
- moviepy应用pyinstaller打包后执行报错AttributeError: module audio/video.fx.all has no attribute fadein、crop
专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 在开发moviepy的Python程序使用pyinstaller打包后 ...
- 成功解决 AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'
在导入keras包时出现这个问题,是因为安装的tensorflow版本和keras版本不匹配,只需卸载keras,重新安装自己tensorflow对应的版本就OK了.可以在这个网址查看tensorfl ...
- AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'处理办法
原因:安装的tensorflow版本和keras版本不匹配,只需卸载keras,重新安装自己tensorflow对应的版本. Keras与tensorflow版本匹配查询网站
- Anaconda安装tensorflow和keras(gpu版,超详细)
本人配置:window10+GTX 1650+tensorflow-gpu 1.14+keras-gpu 2.2.5+python 3.6,亲测可行 一.Anaconda安装 直接到清华镜像网站下载( ...
- keras 的 Deeplabv3+ 实现遇到的问题
代码大佬都已经写好了,具体参考:https://github.com/bonlime/keras-deeplab-v3-plus git clone 下来以后,按照指南要训练自己的数据集,只要设置好自 ...
- 循环神经网络LSTM RNN回归:sin曲线预测
摘要:本篇文章将分享循环神经网络LSTM RNN如何实现回归预测. 本文分享自华为云社区<[Python人工智能] 十四.循环神经网络LSTM RNN回归案例之sin曲线预测 丨[百变AI秀]& ...
随机推荐
- mybatis判断是否为空或null
<if test="catagoryCode != null and catagoryCode != ''"> AND train.CATAGORY_CODE = #{ ...
- vba_pj_0001_auto_date
Const init_info As String = "InitInfo"Const end_row_op As Integer = 100 'tmpConst end_row ...
- python3 - Django3.2框架
提示:web开发已有php.java,而python在这方面,没有优势,python的优势在于:爬虫.人工智能.大数据分析等,python在web开发这方面,没必要掌握:版本:稳定版本:3.2(py3 ...
- 阿里云IPSec的一些问题
1.阿里云IPSec无法进行多段连接单个IPSec连接 解决方案 在阿里云端需要如下操作 1.单个VPN网关下创建多个IPSec连接 连接属性一致 使用兴趣流模式.打开nat转换. 2段对2段 ...
- ts(typescript)讲解for , for...in..., for...of..., while, every, some, map, filter
for 一般用于已知循环次数 var num:number = 5; var i:number; var factorial = 1; for(i = num;i>=1;i--) { fact ...
- STM32F0 LL库IIC第二地址配置错误
最近在做F0项目要用到多个IIC地址,使用Cube生成的LL库,第二地址进不了中断 F0版本:1.11.0 STM32CubeX生成的LL库代码为: 1 static void MX_I2C1_Ini ...
- js 方法记录
1.对象浅拷贝 (array同理)(es6) var aa={}; var bb={name:"xx",info:{age:12,sex:1}} Object.assign(aa, ...
- android kotlin data class的公共参数解决
kotlin的 data class 不能简略的继承 另一个 data class(要初始化对应父类的值) 尝试使用 sealed class 解决 sealed class CommonParams ...
- C++ primer笔记 -标准库类型
最重要的两个标准库类型:string和vector string 类型的输入操作符: 1.读取并忽略开头所有的空白符 2.读取字符直至再次遇到空白字符,读取终止 string对象的基本操作: stri ...
- sublime 设置快捷键
Tools-> Developer-> New Snippet 打开后保存文件要是以 .sublime-snippet 做结尾 <snippet> <content> ...