【问题标题】:In 2.4 version of Tensorflow, should we do tensorflow-gpu seperately after pip installing tensorflow?在2.4版本的Tensorflow中,pip安装tensorflow后是否应该单独做tensorflow-gpu?
【发布时间】:2021-07-04 15:51:28
【问题描述】:

我在安装过程中读到,对于 2.4 版本的 tensorflow,在安装 nvidia cuda 工具包和 cuDNN 之后,执行“$ pip install tensorflow”(访问 GPU)就足够了,而现在没有必要这样做“$ pip install tensorflow-gpu”。

我说得对吗?如果不执行“$ pip install tensorflow-gpu”,我们是否会遗漏任何功能?(附上下面的图片供您参考)

https://towardsdatascience.com/installing-tensorflow-gpu-in-ubuntu-20-04-4ee3ca4cb75d

【问题讨论】:

    标签: python python-3.x tensorflow google-cloud-platform tensorflow2.0


    【解决方案1】:

    如果您已经安装了 cuDNN 和 NVIDIA 工具包,那么您可以使用pip install tensorflow。来自 TensorFlow 文档 (https://www.tensorflow.org/install/gpu):

    TensorFlow pip 包包括对支持 CUDA® 的卡的 GPU 支持:

    $ pip 安装张量流

    本指南介绍了最新稳定版 TensorFlow 的 GPU 支持和安装步骤。

    TensorFlow 的旧版本 对于 1.15 及更早的版本,CPU 和 GPU 包是分开的:

    $ pip install tensorflow==1.15 # CPU
    $ pip install tensorflow-gpu==1.15 # GPU

    【讨论】:

      猜你喜欢
      • 2020-04-26
      • 1970-01-01
      • 2017-07-17
      • 2021-12-28
      • 2021-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-05
      相关资源
      最近更新 更多