gpt4 book ai didi

tensorflow - 在 tensorflow v.1.15 sess=tf.Session() - 无法加载动态库 'cudnn64_7.dll' ; dlerror : cudnn64_7. 找不到 dll

转载 作者:行者123 更新时间:2023-12-03 19:23:11 40 4
gpt4 key购买 nike

我将 tensorflow v.2.0 降级到 v.1.15
然后我在 ipython 中输入了一些代码进行检查。
但是,cudnn64_7.dll 存在一些问题

(base) C:\Users\puppy>ipython
Python 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.8.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import tensorflow as tf
2019-10-31 00:14:52.841679: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll

In [2]: hello=tf.constant('Hello, tensorflow!')

In [3]: sess=tf.Session()
2019-10-31 00:17:45.140209: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2019-10-31 00:17:45.937511: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: GeForce 920M major: 3 minor: 5 memoryClockRate(GHz): 0.954
pciBusID: 0000:03:00.0
2019-10-31 00:17:45.945256: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2019-10-31 00:17:45.981463: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
2019-10-31 00:17:46.039438: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_100.dll
2019-10-31 00:17:46.056982: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_100.dll
2019-10-31 00:17:46.131993: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_100.dll
2019-10-31 00:17:46.192560: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_100.dll
2019-10-31 00:17:46.202156: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found
2019-10-31 00:17:46.209181: 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...
2019-10-31 00:17:46.223313: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2019-10-31 00:17:46.237318: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-10-31 00:17:46.243341: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]

In [4]: print(sess.run(hello))
b'Hello, tensorflow!'

这部分是问题
2019-10-31 00:17:46.202156: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load     dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found
2019-10-31 00:17:46.209181: 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...
2019-10-31 00:17:46.223313: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2019-10-31 00:17:46.237318: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:

为什么我找不到 cudnn64_7.dll?
我下载了 'cuDNN v7.6.4 (September 27, 2019), for CUDA 10.0' 并像这样添加到系统变量的路径中
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\libnvvp
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin\dll
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\extras\CUPTI\libx64

如何解决此问题并使用 GPU 库?

最佳答案

有时会发生 cudnn64_7.dll 从 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin 中自动删除的情况。尝试从提取的 cudnn 包中重新粘贴文件,它会起作用。

关于tensorflow - 在 tensorflow v.1.15 sess=tf.Session() - 无法加载动态库 'cudnn64_7.dll' ; dlerror : cudnn64_7. 找不到 dll,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58639905/

40 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com