如何强制MATLAB在CPU而不是GPU上运行深度学习代码? [英] How do I force MATLAB to run deep learning code on the CPU instead of the GPU?
问题描述
我没有 CUDA 启用的Nvidia GPU,我想强制MATLAB运行代码在CPU而不是GPU(是的,我知道,这将是非常非常缓慢)。
例如,我们尝试运行这段代码在我的电脑没有CUDA。这是MATLAB给出的错误:
CUDA驱动程序或与此GPU设备有问题。确保您有一个支持的GPU,并且安装了最新的驱动程序。
错误在nnet.internal.cnn.SeriesNetwork / activations(第48行)
output = gpuArray(data);
SeriesNetwork / activation中的错误(行269)
YChannelFormat = predictNetwork.activations(X,layerID);
DeepLearningImageClassificationExample中的错误(第262行)
trainingFeatures =激活(convnet,trainingSet,featureLayer,...
引发者:
CUDA驱动程序使用的库名称是nvcuda.dll。错误是:
无法找到指定的模块
使用R2016a,ConvNet功能需要并行计算工具箱™和支持CUDA®的NVIDIA®GPU(计算能力3.0或更高版本)。
查看: http://uk.mathworks.com/help/nnet/convolutional-neural-networks.html
I don't have CUDA-enabled Nvidia GPU, and I want to force MATLAB to run the code on CPU instead of GPU (yes, I know, it will be very very slow). How can I do it?
As an example, let’s try to run this code on my PC without CUDA. Here is the error given by MATLAB:
There is a problem with the CUDA driver or with this GPU device. Be sure that you have a supported GPU and that the latest driver is installed.
Error in nnet.internal.cnn.SeriesNetwork/activations (line 48)
output = gpuArray(data);
Error in SeriesNetwork/activations (line 269)
YChannelFormat = predictNetwork.activations(X, layerID);
Error in DeepLearningImageClassificationExample (line 262)
trainingFeatures = activations(convnet, trainingSet, featureLayer, ...
Caused by:
The CUDA driver could not be loaded. The library name used was 'nvcuda.dll'. The error was:
The specified module could not be found.
With R2016a, the ConvNet "functionality requires the Parallel Computing Toolbox™ and a CUDA®-enabled NVIDIA® GPU with compute capability 3.0 or higher."
See: http://uk.mathworks.com/help/nnet/convolutional-neural-networks.html
这篇关于如何强制MATLAB在CPU而不是GPU上运行深度学习代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!