module 'tensorflow_core._api.v2.config' has no attribute 'experimental_list_devices'
时间:2020-03-28 18:14:50
收藏:0
阅读:1003
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]
参考
原文:https://www.cnblogs.com/Howbin/p/12588278.html
评论(0)