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)