简体   繁体   English

如何让 cudnn 工作? (初始化失败)

[英]How to get cudnn to work ? ( failed to initialize )

Got this error on windows 10在 Windows 10 上出现此错误

UnknownError: Failed to get convolution algorithm. UnknownError: 获取卷积算法失败。 This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.这可能是因为 cuDNN 初始化失败,所以尝试查看上面是否打印了警告日志消息。 [[{{node conv2d_1/convolution}} = Conv2D[T=DT_FLOAT, _class=["loc:@training_1/Adam/gradients/conv2d_1/convolution_grad/Conv2DBackpropFilter"], data_format="NCHW", dilations=[1, 1, 1, 1], padding="VALID", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](training_1/Adam/gradients/conv2d_1/convolution_grad/Conv2DBackpropFilter-0-TransposeNHWCToNCHW-LayoutOptimizer, conv2d_1/kernel/read)]] [[{{node loss_1/mul/_267}} = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_782_loss_1/mul", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]] [[{{节点 conv2d_1/卷积}} = Conv2D[T=DT_FLOAT, _class=["loc:@training_1/Adam/gradients/conv2d_1/convolution_grad/Conv2DBackpropFilter"], data_format="NCHW", dilations=[1, 1 , 1, 1], padding="有效", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0" ](training_1/Adam/gradients/conv2d_1/convolution_grad/Conv2DBackpropFilter-0-TransposeNHWCToNCHW-LayoutOptimizer, conv2d_1/kernel/read)]] [[{{node loss_1/mul/_267}} = _Recvclient_terminated=false, recv_device="/job :localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_782_loss_1/ mul", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]

I have RTx 2070 and:我有 RTx 2070 并且:

Python 3.6.5 tf 1.12.0 tf-gpu 1.12.0 cuda 9.0 with all patches. Python 3.6.5 tf 1.12.0 tf-gpu 1.12.0 cuda 9.0 所有补丁。 cudnn 7.3.1 keras 2.2.4 cudnn 7.3.1 凯拉斯 2.2.4

I know nvdia page for cudnn and I read some other answers here.我知道 cudnn 的 nvdia 页面,我在这里阅读了一些其他答案。 I am interested in small details that are missing.我对遗漏的小细节很感兴趣。 After moving 3 files to 3 directories in the CUDA folder, is there one more step?将CUDA文件夹中的3个文件移动到3个目录后,是不是还要多一步? Perhaps there is an order in which different parts need to be installed?也许有不同部件需要安装的顺序?

Cuda seems to work fine, python sees it, also matlab sees it. Cuda 似乎工作正常,python 看到了,matlab 也看到了。

The error happens while running this code for mnist that I got from the web, which works if I uninstall tensorflow-gpu and use tensorflow on cpu.在为我从网上获得的 mnist 运行此代码时发生错误,如果我卸载 tensorflow-gpu 并在 cpu 上使用 tensorflow,则该代码有效。

An example of great help in the past was that you can't install cuda unless you go custom and uncheck the visual studio option.过去有很大帮助的一个例子是,除非您自定义并取消选中 visual studio 选项,否则您无法安装 cuda。 Thank you !谢谢 !

Had a similar problem with an RTX 2070 card using CUDA 10...使用 CUDA 10 的 RTX 2070 卡也有类似的问题......

The solution was to use:解决方案是使用:

config.gpu_options.allow_growth = True config.gpu_options.allow_growth = True

in tensor flow.在张量流中。

More info on how to use that parameter: How to prevent tensorflow from allocating the totality of a GPU memory?有关如何使用该参数的更多信息: How to prevent tensorflow from allocating the totality of a GPU memory?

RTX cards require CUDA 10 I think.我认为 RTX 卡需要 CUDA 10

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 cuDNN 初始化失败 - cuDNN failed to initialize 获取卷积算法失败。 这可能是因为 cuDNN 初始化失败, - Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, 无法创建 cudnn 句柄:CUDNN_STATUS_ALLOC_FAILED,无法获得卷积算法。 这可能是因为 cuDNN 未能初始化 - Could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED , Failed to get convolution algorithm. This is probably because cuDNN failed to initialize cuDNN 错误 无法获得卷积算法。 这可能是因为 cuDNN 初始化失败 - cuDNN Error Failed to get convolution algorithm. This is probably because cuDNN failed to initialize CNN error Failed to get convolution algorithm.这可能是因为cuDNN初始化失败, - CNN error Failed to get convolution algorithm.This is probably because cuDNN failed to initialize, Tensorflow 错误。 获取卷积算法失败。 这可能是因为 cuDNN 未能初始化 - Tensorflow error. Failed to get convolution algorithm. This is probably because cuDNN failed to initialize Google Colab 错误:无法获得卷积算法。这可能是因为 cuDNN 初始化失败 - Google Colab Error : Failed to get convolution algorithm.This is probably because cuDNN failed to initialize (0) 未知:获取卷积算法失败。 这可能是因为 cuDNN 未能初始化 - (0) Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize CUDA Tensorflow 版本,nvidia-smi 版本问题。 获取卷积算法失败。 这可能是因为 cuDNN 初始化失败, - CUDA Tensorflow Version ,nvidia-smi version issue. Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, 获取卷积算法失败。 这可能是因为 cuDNN 初始化失败,所以尝试查看是否打印了警告日志消息 - Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM