Google Colab 加载运行时 CuDNN 库:8.0.5 但源代码编译为:8.1.0
在 Google Collab 中使用 Tensorflow 2 对象检测 API 进行训练时,出现以下错误:
2022-03-07 15:27:51.475298: E tensorflow/stream_executor/cuda/cuda_dnn.cc:359] Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0. CuDNN library needs to have matching major version and equal or higher minor 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.
2022-03-07 15:27:51.477142: W tensorflow/core/framework/op_kernel.cc:1745] OP_REQUIRES failed at conv_ops.cc:1120 : UNKNOWN: 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 above.
我尝试使用以下 StackOverflow 答案在 Google Collab 中更新我的 CuDNN 库: 已加载运行时 CuDNN 库:8.0.5,但源代码编译为:8.1.0。使用 Google Colab 时。 然而,这并不能解决问题。
我使用的是 Tensorflow 2.7.0。
While training with Tensorflow 2 Object Detection API in Google Collab, I get the following errors:
2022-03-07 15:27:51.475298: E tensorflow/stream_executor/cuda/cuda_dnn.cc:359] Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0. CuDNN library needs to have matching major version and equal or higher minor 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.
2022-03-07 15:27:51.477142: W tensorflow/core/framework/op_kernel.cc:1745] OP_REQUIRES failed at conv_ops.cc:1120 : UNKNOWN: 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 above.
I have tried updating my CuDNN library in Google collab, using this StackOverflow answer:
Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0. when using google colab.
However, this does not solve the issue.
I am using Tensorflow 2.7.0.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以下是该问题的解决方法,发布在官方 Github 上,
这可能不会始终工作并且可能不安全,但作为暂时的解决方法,您可以尝试运行
!apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2
The following is a workaround for the problem, as posted on the official Github
This may not work always and may not be safe, but as a workaround for the time being, you may try running
!apt install --allow-change-held-packages libcudnn8=8.1.0.77-1+cuda11.2