我尝试在Microsoft Azure Machine Learning Studio GPU机器中的笔记本电脑上安装Keras模型。我收到了一个类似于here所描述的错误:
2023-04-27 09:56:21.098249: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:417] Loaded runtime CuDNN library: 8.2.4 but source was compiled with: 8.6.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.
2023-04-27 09:56:21.099011: W tensorflow/core/framework/op_kernel.cc:1830] OP_REQUIRES failed at pooling_ops_common.cc:412 : UNIMPLEMENTED: DNN library is not found.
2023-04-27 09:56:21.099050: I tensorflow/core/common_runtime/executor.cc:1197] [/job:localhost/replica:0/task:0/device:GPU:0] (DEBUG INFO) Executor start aborting (this does not indicate an error and you can ignore this message): UNIMPLEMENTED: DNN library is not found.
[[{{node model_2/max_pooling1d_6/MaxPool}}]]
2023-04-27 09:56:21.100704: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:417] Loaded runtime CuDNN library: 8.2.4 but source was compiled with: 8.6.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.
2023-04-27 09:56:21.101366: W tensorflow/core/framework/op_kernel.cc:1830] OP_REQUIRES failed at pooling_ops_common.cc:412 : UNIMPLEMENTED: DNN library is not found.
Azures机器的解决方案是什么?
1条答案
按热度按时间vbkedwbf1#
您遇到的错误是由于运行时使用的CuDNN库版本(8.2.4)和您的TensorFlow编译时使用的版本(8.要解决此问题,您需要升级CuDNN库以匹配主版本,并具有与编译TensorFlow时使用的版本相同或更高的次版本。
以下是在Microsoft Azure Machine Learning Studio GPU计算机上升级CuDNN库的步骤:
在Unix机器上:
访问:how do I update cuDNN to a newer version?
访问:https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html
像这样的扩展。h,.so,and。cubin。
3-在Azure Machine Learning Studio GPU计算机上找到现有的CuDNN库。您可以使用以下命令查找已安装的CuDNN库的路径:
此命令将返回已安装的CuDNN库文件的路径。请注意包含这些文件的目录。
4-备份现有的CuDNN库文件:
将/path/to/old/cudnn/替换为您在步骤3中找到的目录。
5-将新CuDNN库文件复制到相应的目录:
将/path/to/new/cudnn/替换为您在步骤2中解压缩下载的CuDNN归档文件的目录。
6-更新库缓存:
sudo ldconfig
7-在Azure Machine Learning Studio中重新启动你的笔记本,CuDNN库不匹配问题应该会得到解决。
对于Windows Machine:
访问:https://medium.com/geekculture/install-cuda-and-cudnn-on-windows-linux-52d1501a8805
1-下载相应的CuDNN版本(8.6.0或更高版本)从NVIDIA网站下载:https://developer.nvidia.com/cudnn
2-将下载的存档解压缩到您选择的目录中。解压缩的目录应包含扩展名为。h、.dll和。库。
3-将CuDNN库文件复制到相应的目录:
更换v11。2在目录路径中与您在计算机上安装的CUDA版本相对应。
4-将CuDNN bin目录路径添加到PATH环境变量:
setx PATH“%PATH%;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11。2\bin”
就是这样!通过这些步骤,您应该能够在Windows机器上安装CuDNN库并将其用于您的项目。