为什么 GTX-960 无法与 Windows10 中的 Matlab 2016a 通信?

Why GTX-960 cannot Communicate with Matlab 2016a in Windows 10?

系统:GTX-960,带 NVidia 驱动程序 365.10,32 GB,Lenovo PC 2013,i7 2013,Windows10 教育版。 基于 CNN 手册的 Matlab 2016a 测试代码 here

% Load the training data into memory
[xTrainImages, tTrain] = digittrain_dataset;

rng('default'); % random number generator seed

hiddenSize1 = 100; 

autoenc1 = trainAutoencoder(xTrainImages,hiddenSize1, ...
    'MaxEpochs',400, ...
    'L2WeightRegularization',0.004, ...
    'SparsityRegularization',4, ...
    'SparsityProportion',0.15, ...
    'ScaleData', false);

feat1 = encode(autoenc1,xTrainImages);

%% Second set of features
hiddenSize2 = 50;
autoenc2 = trainAutoencoder(feat1,hiddenSize2, ...
    'MaxEpochs',100, ...
    'L2WeightRegularization',0.002, ...
    'SparsityRegularization',4, ...
    'SparsityProportion',0.1, ...
    'ScaleData', false);

feat2 = encode(autoenc2,feat1);

softnet = trainSoftmaxLayer(feat2,tTrain,...
    'MaxEpochs',400, ...
    'useGPU', 'yes',...
    'showResources', 'yes');
softnet.trainFcn = 'trainscg'; % to avoid warning with GPU

view(autoenc2) % The Error comes from here!

它在会话结束时给出的输出;否则,它似乎正确优化但显然没有 GPU,因为 OpenHardwareMonitor 应用程序指示 GPU 未使用(GPU 风扇 0 RPM,GPU 核心值 0.0-16.0%(更改),最大 68%(不变)

Error using trainSoftmaxLayer>iParseInputArguments (line 61) 'useGPU' is not a recognized parameter. For a list of valid name-value pair arguments, see the documentation for this function.

休的提议

代码更改

autoenc1 = trainAutoencoder(xTrainImages,hiddenSize1, ...
    'MaxEpochs',400, ...
    'L2WeightRegularization',0.004, ...
    'SparsityRegularization',4, ...
    'SparsityProportion',0.15, ...
    'useGPU', 'yes',...
    'ScaleData', false);

autoenc2 = trainAutoencoder(feat1,hiddenSize2, ...
    'MaxEpochs',100, ...
    'L2WeightRegularization',0.002, ...
    'SparsityRegularization',4, ...
    'SparsityProportion',0.1, ...
    'useGPU', 'yes',...
    'ScaleData', false);

softnet = trainSoftmaxLayer(feat2,tTrain,...
    'MaxEpochs',400, ...
    'showResources', 'yes');

输出

Error using Autoencoder.parseInputArguments (line 477)
'UseGPU' must be a logical value.

Error in trainAutoencoder (line 103)
paramsStruct  = Autoencoder.parseInputArguments(varargin{:});

Error in bnn_image (line 17)
autoenc1 = trainAutoencoder(xTrainImages,hiddenSize1, ...

如何确认 GTX-960 在 Windows 10 中与 Matlab 2016a 的通信情况?

trainSoftmaxLayer 函数不接受 useGPU 作为输入 (help document on trainSoftmaxLayer) while the trainAutoencoder function does (help document on trainAutoencoder) along with the normal train function (help document on train)。您可以使用这些功能中的任何一个来解决您的问题吗?如果没有并且您绝对需要使用 Softmax,那么您将需要自己编写代码 - 这并不容易。