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)

相关文章:

  • 2021-11-02
  • 2021-11-28
  • 2021-08-27
  • 2021-10-09
  • 2021-09-09
  • 2021-10-09
  • 2021-12-13
  • 2021-06-06
猜你喜欢
  • 2022-12-23
  • 2021-04-18
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2021-12-19
相关资源
相似解决方案