![](/img/trans.png)
[英]Failed to get convolution algorithm. This is probably because cuDNN failed to initialize,
[英]CUDA Tensorflow Version ,nvidia-smi version issue. Failed to get convolution algorithm. This is probably because cuDNN failed to initialize,
试过了, preds = model.predict(k[np.newaxis,...])
UnknownError:获取卷积算法失败。 这可能是因为 cuDNN 初始化失败,因此请尝试查看上面是否打印了警告日志消息。 [[节点模型/stem_conv/Conv2D(定义于:3)]] [Op:__inference_distributed_function_18348]
硬件: 制造商: OMEN,OS_ Windows 10,GPU NVIDIA GEFORCE RTX 2060,我的系统配置
!nvcc --版本
> nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA
> Corporation Built on Sun_Jul_28_19:12:52_Pacific_Daylight_Time_2019
> Cuda compilation tools, release 10.1, V10.1.243
!nvidia-smi
2020 年 7 月 20 日星期一 23:15:20
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 451.77 Driver Version: 451.77 CUDA Version: 11.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 2060 WDDM | 00000000:01:00.0 Off | N/A |
| N/A 38C P8 5W / N/A | 5304MiB / 6144MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 18900 C ...nvs\tensorflow\python.exe N/A |
+-----------------------------------------------------------------------------+
好像少了点什么。 CUDA 版本不同步是我猜的。 请纠正我。 如果它的 NVIDIA STUDIO 驱动程序不合适,请有人帮我一个适合 Tensorflow 2.1.0 的驱动程序
Tensor Flow Version: 2.1.0, Keras Version: 2.2.4-tf, Python 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)],Pandas 1.0.5 ,Scikit-Learn 0.23.1
我有类似的问题。 在我将 CUDA 从 11 版本降级到 10.1 版本( NVIDIA Link )后,它得到了修复。
根据 TF 文档:
CUDA® Toolkit —TensorFlow 支持 CUDA 10.1 (TensorFlow >= 2.1.0)
编辑(更多信息如下):
您可以在以下位置找到兼容的驱动程序: https://www.nvidia.com/en-us/drivers/results/149127/
我使用Python 3.7
以及安装在conda
环境中的tensorflow-gpu
。
注意:如果您使用pip install tensorflow
,它可能没有下载 Z39466FE22B062A3868CFE0 所需的 python 包。 我建议您卸载/重新安装:
pip install tensorflow-gpu
这是我的 output 用于快速测试:
import tensorflow as tf
print(tf.__version__)
print(tf.config.experimental.list_physical_devices('GPU'))
2.1.0
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
供你参考:
nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 431.70 Driver Version: 431.70 CUDA Version: 10.1 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 206... WDDM | 00000000:01:00.0 On | N/A |
| 32% 44C P8 21W / 175W | 510MiB / 8192MiB | 3% Default |
+-------------------------------+----------------------+----------------------+
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:26_Pacific_Standard_Time_2019
Cuda compilation tools, release 10.1, V10.1.105
来自cudnn.h
(路径: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include
)
请注意,您需要手动将文件移动到此位置。 请参考安装说明:
说明: https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#install-windows
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 6
#define CUDNN_PATCHLEVEL 5
希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.