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

2021-03-12 14:27

阅读:537

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

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]

参考

  • https://stackoverflow.com/questions/60581677/attributeerror-module-tensorflow-core-api-v2-config-has-no-attribute-expe
  • https://github.com/keras-team/keras/issues/13684

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

上一篇:linux dd win

下一篇:js之window


评论


亲,登录后才可以留言!