代码来自博客:如何可视化卷积神经网络特征(基于matlab R2018b)
警告: The CUDA driver must recompile the GPU libraries because your device is more recent than the libraries. Recompiling can take several minutes. Learn more. 错误使用 nnet.internal.cnngpu.convolveForward2D Unexpected error calling cuDNN: CUDNN_STATUS_EXECUTION_FAILED.
在matlab命令行输入:
>> gpuDevice ans = CUDADevice - 属性: Name: 'GeForce RTX 2080 Ti' Index: 1 ComputeCapability: '7.5' SupportsDouble: 1 DriverVersion: 10.2000 >> nvcc --version 未定义函数或变量 'nvcc'。操作: 点击:主页 ,设置路径,添加文件夹,选择下面两个路径: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\libnvvp 添加完成后点击保存。
之后再次运行代码,可以成功运行啦。
在代码中随意添加一行:将0.0001存入GUP中,之后再重新运行net = trainNetwork( ),不会出现报错问题。
ile = gpuArray(0.0001); net = trainNetwork(XTrain,YTrain,lgraph_1,options);参考网址:https://www.mathworks.com/matlabcentral/answers/391368-cudnn-error-on-surface-book-2-when-running-cnn-example?s_tid=srchtitle