Neural Network GPU training with output weights fails with "No method 'subsref' "

2 次查看(过去 30 天)
When training a NN I would like to use output weights (between 0 and 1), but I get the following error :
No method 'subsref' with matching signature found for class 'gpuArray'
My function does the following :
% get the gpuDevice
% load data
% change 'tansig' transferFcn to 'elliotsig'
for i=1:net.numLayers
if strcmp(net.layers{i}.transferFcn,'tansig')
net.layers{i}.transferFcn = 'elliotsig';
end
end
% I had to alter processFcns to avoid the following errors :
% Input processing function REMOVECONSTANTROWS is not supported with GPU.
net.input.processFcns = {'mapminmax'};
net.output.processFcns = {'mapminmax'};
% convert data to GPU data with the nndata2gpu function
% Then train
net2 = train(net2, x, t, [], [], wtsOutG);
The error returned is :
No method 'subsref' with matching signature found for class 'gpuArray'
  1 个评论
Aditya Patil
Aditya Patil 2020-9-21
Can you provide a sample code snippet that creates the error? I am unable to reproduce to error with the given code, hence it might be possible that the issue lies in rest of the code.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Pattern Recognition and Classification 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by