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

解決方法

找到如下圖路徑:
enterdescription here
修改506行:

_LOCAL_DEVICES = tf.config.experimental_list_devices()

devices = tf.config.list_logical_devices()

_LOCAL_DEVICES = [x.name for x in devices]

參考


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM