【问题标题】:why tf.test.is_gpu_available() did not provide true or false,it got stuck?为什么 tf.test.is_gpu_available() 没有提供真假,它卡住了?
【发布时间】:2021-01-04 17:28:34
【问题描述】:

安装 tensorflow gpu = 2.0.0 后检测到 gpu 后卡住了。 这个项目的环境设置是

  1. ubuntu 18.04
  2. cuda 10.0
  3. cudnn 7.4.1
  4. 创建了一个虚拟环境
  5. 安装 tensorflow-gpu=2.0.0

在尝试使用 tf.test.is_gpu_available().compliation 检查 gpu 时卡住了,如下所示。

enter image description here

【问题讨论】:

  • 如果你是第一次启动 Tensorflow?如果是这种情况,请尝试等待 5 到 10 分钟,Tensorflow 需要在您第一次执行程序时加载 CUDA 内核。
  • 2020-04-16 16:08:46.499296: I tensorflow/compiler/xla/service/service.cc:175] StreamExecutor 设备 (1): Tesla T4, Compute Capability 7.5 开启后控制台..它卡住了

标签: tensorflow ubuntu-18.04


【解决方案1】:

将cudnn版本改为7.6.2。然后它运行良好。

【讨论】:

    猜你喜欢
    • 2017-02-20
    • 2013-06-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-01
    • 2016-11-01
    相关资源
    最近更新 更多