码迷,mamicode.com
首页 > Windows程序 > 详细

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

时间:2020-03-28 18:12:48      阅读:726      评论:0      收藏:0      [点我收藏+]

标签:color   view   修改   ror   lan   toc   路径   size   http   

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'

标签:color   view   修改   ror   lan   toc   路径   size   http   

原文地址:https://www.cnblogs.com/Howbin/p/12588278.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!