【问题标题】:My tensorflow doesn't detect my gpu and use my cpu (machine learning)我的 tensorflow 没有检测到我的 gpu 并使用我的 cpu(机器学习)
【发布时间】:2021-09-14 05:38:39
【问题描述】:

我尝试使用我的 rtx380 10g 训练机器学习模型,并在我的计算机上使用 ubuntu 20.4。

当我午餐我的应用程序时,它说我:

2021-07-02 10:29:53.581609: I tensorflow/core/platform/profile_utils/cpu_utils.cc:114] CPU Frequency: 2496000000 Hz

之后,我尝试打印 len(my phisical_devices('Gpu')) 但它给了我“0”。

我安装了 Conda,但我不确定它是否正常工作。 (Cudnn 也一样)

说实话,我现在很迷茫。

【问题讨论】:

    标签: python tensorflow gpu cpu-usage


    【解决方案1】:

    我遇到了同样的问题,你安装了 CUDA Toolkit,它是基于你的 GPU 的正确版本吗?

    你也这样做了

    pip install tensorflow-gpu
    

    试试这个帖子:Tensorflow not running on GPU

    【讨论】:

      【解决方案2】:

      这可能是兼容性问题。确保您的 TF 版本与您 PC 上安装的 Python、Cuda 和 Cudnn 版本兼容,并确保安装了 Microsoft Visual Studio。

      我目前正在使用 TF2.4、Python 3.8、Cuda 11.0 和 Cudnn 8.0。试试这个组合,看看它是否有效。

      【讨论】:

        猜你喜欢
        • 2021-05-12
        • 1970-01-01
        • 2020-11-17
        • 2021-07-29
        • 1970-01-01
        • 2020-04-20
        • 2020-12-04
        • 2017-05-15
        • 2019-01-19
        相关资源
        最近更新 更多