只是爱了童话 2020-07-15 10:50 采纳率: 50%
浏览 4239
已结题

AttributeError: module 'tensorflow' has no attribute 'config'怎么解决?

import tensorflow as tf
print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))


  • 写回答

4条回答 默认 最新

  • zhongshan1993 2021-02-02 01:33
    关注

    我也有相同的问题。关键在于我用jupyter notebook打开是可以运行的,但用vscode打开就运行不了。我的tf版本是2.4

    评论

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 4月20日