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

kearsPython

报错如下

建立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'的更多相关文章

  1. AttributeError: module ‘tensorflow.python.ops.nn’ has no attribute ‘leaky_relu’

    #AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'leaky_relu' 的原因主要是版本的问题 解决方法是更新 ...

  2. 启动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 ...

  3. AttributeError: module 'selenium.webdriver.common.service' has no attribute 'Service'

    今天爬虫时需要使用到selenium, 使用pip install selenium进行安装. 可是一开始写程序就遇到了AttributeError: module 'selenium.webdriv ...

  4. 关于moviepy打包报错AttributeError: module audio/video.fx.all has no attribute fadein、crop文章的纠错和抄袭

    专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 老猿学5G博文目录 老猿前面有篇文章<moviepy应用pyin ...

  5. moviepy应用pyinstaller打包后执行报错AttributeError: module audio/video.fx.all has no attribute fadein、crop

    专栏:Python基础教程目录 专栏:使用PyQt开发图形界面Python应用 专栏:PyQt入门学习 老猿Python博文目录 在开发moviepy的Python程序使用pyinstaller打包后 ...

  6. 成功解决 AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'

    在导入keras包时出现这个问题,是因为安装的tensorflow版本和keras版本不匹配,只需卸载keras,重新安装自己tensorflow对应的版本就OK了.可以在这个网址查看tensorfl ...

  7. AttributeError: module 'tensorflow.python.keras.backend' has no attribute 'get_graph'处理办法

    原因:安装的tensorflow版本和keras版本不匹配,只需卸载keras,重新安装自己tensorflow对应的版本. Keras与tensorflow版本匹配查询网站  

  8. Anaconda安装tensorflow和keras(gpu版,超详细)

    本人配置:window10+GTX 1650+tensorflow-gpu 1.14+keras-gpu 2.2.5+python 3.6,亲测可行 一.Anaconda安装 直接到清华镜像网站下载( ...

  9. keras 的 Deeplabv3+ 实现遇到的问题

    代码大佬都已经写好了,具体参考:https://github.com/bonlime/keras-deeplab-v3-plus git clone 下来以后,按照指南要训练自己的数据集,只要设置好自 ...

  10. 循环神经网络LSTM RNN回归:sin曲线预测

    摘要:本篇文章将分享循环神经网络LSTM RNN如何实现回归预测. 本文分享自华为云社区<[Python人工智能] 十四.循环神经网络LSTM RNN回归案例之sin曲线预测 丨[百变AI秀]& ...

随机推荐

  1. Spark 中三种数据处理对象的区别: RDD-Dataset-Dataframe

    1,对比表:   RDD Dataframe Dataset 版本 1.0 1.3 1.6 描述 分布式数据集合 行列化的分布式数据集合  RDD 和 DataFrame的结合 数据格式 结构化和非结 ...

  2. async/await和promise的执行顺序

    原题: async function async1() { console.log("async1 start"); await async2(); console.log(&qu ...

  3. 处理uniapp激励广告

    使用uniapp查看广告 激励视频广告组件.激励视频广告组件是一个原生组件,并且是一个全局单例.层级比上屏 Canvas 高,会覆盖在上屏 Canvas 上.激励视频 广告组件默认是隐藏的,需要调用 ...

  4. 【转载】synopsys中工具介绍,VCS,DC,PT等

    https://blog.csdn.net/fangxiangeng/article/details/80981536

  5. 4口高速USB 2.0 HUB控制器 DPU1.1S,兼容替代FE1.1S

    DPU1.1S是一款高性能.低功耗 4 口高速 USB2.0HUB 控制器,上行端口兼容高速 480MHz和全速 12MHz 两种模式,4个下行端口兼容高速480MHz.全速12MHz.低速 1.5M ...

  6. HANA 2022 ME21N \ME31K 客制字段

    问题:客制字段维护不上去 解决方案:抬头字段 打补丁 note 3275982 - Data loss observed in custom fields when working in the tr ...

  7. Qt 程序主界面添加背景图片

    1.开发环境:Qt5.12.2,QtCreate4.8.2 2.贴图代码,在主程序中编写 #include <QImageReader> int main(int argc, char * ...

  8. 控制台程序console输入参数 获取参数

    class Program    {        static void Main(string[] args)        {                                 i ...

  9. WPF中获取主窗口 MainWindow 实例,以及在其他窗口中获取 MainWinodw 中的控件

    var _mainWindow = Application.Current.Windows .Cast<Window>() .FirstOrDefault(window => win ...

  10. NLB+ARR实现IIS下的高可用性负载均衡

    NLB+ARR实现IIS下的高可用性负载均衡 场景: 高可用/可伸缩集群: NLB部署: 很简单, 暂略.   3.ARR部署 ARR全称叫Application Request Router, 是I ...