Loaded runtime CuDNN library: 7.4.1 but source was compiled with: 7.6.0.

win10 CUDA 10.0 cudnn 7.4.1

E tensorflow/stream_executor/cuda/cuda_dnn.cc:319] Loaded runtime CuDNN library: 7.4.1 but source was compiled with: 7.6.0. CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library. If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.

今天将原来在cpu上跑的程序移植到tensorflow-gpu 2.0的版本上跑,结果出现了如下错误:

Epoch 1/2
2020-10-29 10:36:22.735575: W tensorflow/core/grappler/optimizers/implementation_selector.cc:310] Skipping optimization due to error while loading function libraries: Invalid argument: Functions '__inference___backward_cudnn_lstm_with_fallback_2577_2759_specialized_for_StatefulPartitionedCall_at___inference_distributed_function_3542' and '__inference___backward_standard_lstm_2950_3435' both implement 'lstm_9415c58f-6404-4912-a877-c79616515424' but their signatures do not match.
2020-10-29 10:36:22.814593: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
2020-10-29 10:36:23.099220: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll

 1024/35254 [..............................] - ETA: 1:272020-10-29 10:36:24.145685: E tensorflow/stream_executor/cuda/cuda_dnn.cc:319] Loaded runtime CuDNN library: 7.4.1 but source was compiled with: 7.6.0.  CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library.  If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.
2020-10-29 10:36:24.146821: W tensorflow/core/framework/op_kernel.cc:1622] OP_REQUIRES failed at cudnn_rnn_ops.cc:1491 : Unknown: Fail to find the dnn implementation.
2020-10-29 10:36:24.147015: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Unknown: Fail to find the dnn implementation.
	 [[{{node CudnnRNN}}]]
2020-10-29 10:36:24.147270: W tensorflow/core/common_runtime/base_collective_executor.cc:216] BaseCollectiveExecutor::StartAbort Unknown: {{function_node __forward_cudnn_lstm_with_fallback_2758_specialized_for_model_lstm_StatefulPartitionedCall_at___inference_distributed_function_3542}} {{function_node __forward_cudnn_lstm_with_fallback_2758_specialized_for_model_lstm_StatefulPartitionedCall_at___inference_distributed_function_3542}} Fail to find the dnn implementation.
	 [[{{node CudnnRNN}}]]
	 [[model/lstm/StatefulPartitionedCall]]
WARNING:tensorflow:Early stopping conditioned on metric `val_loss` which is not available. Available metrics are:

其中:

E tensorflow/stream_executor/cuda/cuda_dnn.cc:319] Loaded runtime CuDNN library: 7.4.1 but source was compiled with: 7.6.0.  CuDNN library major and minor version needs to match or have higher minor version in case of CuDNN 7.0 or later version. If using a binary install, upgrade your CuDNN library.  If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration.

查看报错的提示,最开始以为时cudnn版本不兼容,后来查资料发现有人和我遇到了基本相同的报错内容,参考:
[cudnn报错解决]Loaded runtime CuDNN library: 7.0.5 but source was compiled with: 7.2.1.

发现只要更改tensorflow-gpu的版本就可以了,于是将我的tensorflow-gpu 2.0 降为1.15就可以了,而不用更改cudnn的版本。

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值