AttributeError: module 'tensorflow_core._api.v2.config' has no attribute 'list_physical_devices'


AttributeError: module 'tensorflow_core._api.v2.config' has no attribute 'list_physical_devices'

應該是接口更新了,改成以下接口就不會報錯了。

查看所有GPU

tf.config.experimental.list_physical_devices('GPU')

查看所有設備

tf.config.experimental.list_physical_devices(device_type=None)


免責聲明!

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



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