【问题标题】:Not detecting TensorFlow GPU (TF_GPU - V1.15)未检测到 TensorFlow GPU (TF_GPU - V1.15)
【发布时间】:2020-02-23 14:12:56
【问题描述】:

我正在尝试运行 Keras 代码。一切正常。除了我想知道为什么培训要花这么多时间。在我了解到这一点之前,gpu 没有被检测到。我试图通过下面这个简单的代码来测试 GPU 是否被检测到, 图像中红色框显示的错误位于图片顶部。请让我知道如何解决此问题。 还有一件事,我安装了 tensorflow V1.15,因为一些模块在 V2 中被贬低了,所以我不得不降级它。 https://i.stack.imgur.com/mfoRM.jpg

>>> import tensorflow as tf
>>> tf.test.is_built_with_cuda()

True

>>> tf.test.is_gpu_available(cuda_only=False, min_cuda_compute_capability=None)

2020-02-23 19:18:48.893786: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2020-02-23 19:18:48.911886: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2020-02-23 19:18:49.717223: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: GeForce GTX 1050 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.62
pciBusID: 0000:01:00.0
2020-02-23 19:18:49.722976: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2020-02-23 19:18:49.728562: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cublas64_100.dll'; dlerror: cublas64_100.dll not found
2020-02-23 19:18:49.734177: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cufft64_100.dll'; dlerror: cufft64_100.dll not found
2020-02-23 19:18:49.740876: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'curand64_100.dll'; dlerror: curand64_100.dll not found
2020-02-23 19:18:49.748607: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusolver64_100.dll'; dlerror: cusolver64_100.dll not found
2020-02-23 19:18:49.756587: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cusparse64_100.dll'; dlerror: cusparse64_100.dll not found
2020-02-23 19:18:49.862997: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2020-02-23 19:18:49.869116: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1641] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2020-02-23 19:18:50.439029: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-02-23 19:18:50.444445: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]      0
2020-02-23 19:18:50.447461: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0:   N
False

【问题讨论】:

    标签: python tensorflow gpu


    【解决方案1】:

    好的,当我将它升级到 v2 时,它现在可以工作了。我可以使用 tf.v1.compat 重用所有已弃用的代码。 例如, tf.get_session 被贬低了。现在我可以通过编写在 V2 中使用它, tf.v1.compat.get_session 并且有效。

    【讨论】:

      猜你喜欢
      • 2017-09-15
      • 2018-05-31
      • 2020-12-10
      • 2020-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-23
      • 2020-11-17
      相关资源
      最近更新 更多